Fossil SCM
Make option --ignore-space-at-sol work correctly with side-by-side diff as well.
Commit
7763b2e64cf6903524c30cbea044f6f7f865d12d
Parent
65397b575eee808…
2 files changed
+4
-1
+1
-1
+4
-1
| --- src/diff.c | ||
| +++ src/diff.c | ||
| @@ -533,10 +533,13 @@ | ||
| 533 | 533 | p->iEnd = p->iEnd2; |
| 534 | 534 | p->iEnd2 = 0; |
| 535 | 535 | } |
| 536 | 536 | } |
| 537 | 537 | } |
| 538 | + if( pLine->indent && i==0 ){ | |
| 539 | + blob_appendf(pCol, "%*s", pLine->indent, " "); | |
| 540 | + } | |
| 538 | 541 | if( c=='\t' && !p->escHtml ){ |
| 539 | 542 | blob_append(pCol, " ", 1); |
| 540 | 543 | while( (k&7)!=7 && (p->escHtml || k<w) ){ |
| 541 | 544 | blob_append(pCol, " ", 1); |
| 542 | 545 | k++; |
| @@ -560,11 +563,11 @@ | ||
| 560 | 563 | blob_append(pCol, "</span>", 7); |
| 561 | 564 | } |
| 562 | 565 | if( col==SBS_TXTB ){ |
| 563 | 566 | sbsWriteNewlines(p); |
| 564 | 567 | }else if( !p->escHtml ){ |
| 565 | - sbsWriteSpace(p, w-k, SBS_TXTA); | |
| 568 | + sbsWriteSpace(p, w-k-pLine->indent, SBS_TXTA); | |
| 566 | 569 | } |
| 567 | 570 | } |
| 568 | 571 | |
| 569 | 572 | /* |
| 570 | 573 | ** Append a column to the final output blob. |
| 571 | 574 |
| --- src/diff.c | |
| +++ src/diff.c | |
| @@ -533,10 +533,13 @@ | |
| 533 | p->iEnd = p->iEnd2; |
| 534 | p->iEnd2 = 0; |
| 535 | } |
| 536 | } |
| 537 | } |
| 538 | if( c=='\t' && !p->escHtml ){ |
| 539 | blob_append(pCol, " ", 1); |
| 540 | while( (k&7)!=7 && (p->escHtml || k<w) ){ |
| 541 | blob_append(pCol, " ", 1); |
| 542 | k++; |
| @@ -560,11 +563,11 @@ | |
| 560 | blob_append(pCol, "</span>", 7); |
| 561 | } |
| 562 | if( col==SBS_TXTB ){ |
| 563 | sbsWriteNewlines(p); |
| 564 | }else if( !p->escHtml ){ |
| 565 | sbsWriteSpace(p, w-k, SBS_TXTA); |
| 566 | } |
| 567 | } |
| 568 | |
| 569 | /* |
| 570 | ** Append a column to the final output blob. |
| 571 |
| --- src/diff.c | |
| +++ src/diff.c | |
| @@ -533,10 +533,13 @@ | |
| 533 | p->iEnd = p->iEnd2; |
| 534 | p->iEnd2 = 0; |
| 535 | } |
| 536 | } |
| 537 | } |
| 538 | if( pLine->indent && i==0 ){ |
| 539 | blob_appendf(pCol, "%*s", pLine->indent, " "); |
| 540 | } |
| 541 | if( c=='\t' && !p->escHtml ){ |
| 542 | blob_append(pCol, " ", 1); |
| 543 | while( (k&7)!=7 && (p->escHtml || k<w) ){ |
| 544 | blob_append(pCol, " ", 1); |
| 545 | k++; |
| @@ -560,11 +563,11 @@ | |
| 563 | blob_append(pCol, "</span>", 7); |
| 564 | } |
| 565 | if( col==SBS_TXTB ){ |
| 566 | sbsWriteNewlines(p); |
| 567 | }else if( !p->escHtml ){ |
| 568 | sbsWriteSpace(p, w-k-pLine->indent, SBS_TXTA); |
| 569 | } |
| 570 | } |
| 571 | |
| 572 | /* |
| 573 | ** Append a column to the final output blob. |
| 574 |
+1
-1
| --- src/diffcmd.c | ||
| +++ src/diffcmd.c | ||
| @@ -1102,11 +1102,11 @@ | ||
| 1102 | 1102 | */ |
| 1103 | 1103 | void diff_cmd(void){ |
| 1104 | 1104 | int isGDiff; /* True for gdiff. False for normal diff */ |
| 1105 | 1105 | int isInternDiff; /* True for internal diff */ |
| 1106 | 1106 | int verboseFlag; /* True if -v or --verbose flag is used */ |
| 1107 | - const char *zFrom; /* Source version number */ | |
| 1107 | + const char *zFrom; /* Source version number */ | |
| 1108 | 1108 | const char *zTo; /* Target version number */ |
| 1109 | 1109 | const char *zBranch; /* Branch to diff */ |
| 1110 | 1110 | const char *zDiffCmd = 0; /* External diff command. NULL for internal diff */ |
| 1111 | 1111 | const char *zBinGlob = 0; /* Treat file names matching this as binary */ |
| 1112 | 1112 | int fIncludeBinary = 0; /* Include binary files for external diff */ |
| 1113 | 1113 |
| --- src/diffcmd.c | |
| +++ src/diffcmd.c | |
| @@ -1102,11 +1102,11 @@ | |
| 1102 | */ |
| 1103 | void diff_cmd(void){ |
| 1104 | int isGDiff; /* True for gdiff. False for normal diff */ |
| 1105 | int isInternDiff; /* True for internal diff */ |
| 1106 | int verboseFlag; /* True if -v or --verbose flag is used */ |
| 1107 | const char *zFrom; /* Source version number */ |
| 1108 | const char *zTo; /* Target version number */ |
| 1109 | const char *zBranch; /* Branch to diff */ |
| 1110 | const char *zDiffCmd = 0; /* External diff command. NULL for internal diff */ |
| 1111 | const char *zBinGlob = 0; /* Treat file names matching this as binary */ |
| 1112 | int fIncludeBinary = 0; /* Include binary files for external diff */ |
| 1113 |
| --- src/diffcmd.c | |
| +++ src/diffcmd.c | |
| @@ -1102,11 +1102,11 @@ | |
| 1102 | */ |
| 1103 | void diff_cmd(void){ |
| 1104 | int isGDiff; /* True for gdiff. False for normal diff */ |
| 1105 | int isInternDiff; /* True for internal diff */ |
| 1106 | int verboseFlag; /* True if -v or --verbose flag is used */ |
| 1107 | const char *zFrom; /* Source version number */ |
| 1108 | const char *zTo; /* Target version number */ |
| 1109 | const char *zBranch; /* Branch to diff */ |
| 1110 | const char *zDiffCmd = 0; /* External diff command. NULL for internal diff */ |
| 1111 | const char *zBinGlob = 0; /* Treat file names matching this as binary */ |
| 1112 | int fIncludeBinary = 0; /* Include binary files for external diff */ |
| 1113 |