Fossil SCM

Make option --ignore-space-at-sol work correctly with side-by-side diff as well.

jan.nijtmans 2014-03-03 11:55 diff-eolws
Commit 7763b2e64cf6903524c30cbea044f6f7f865d12d
2 files changed +4 -1 +1 -1
+4 -1
--- src/diff.c
+++ src/diff.c
@@ -533,10 +533,13 @@
533533
p->iEnd = p->iEnd2;
534534
p->iEnd2 = 0;
535535
}
536536
}
537537
}
538
+ if( pLine->indent && i==0 ){
539
+ blob_appendf(pCol, "%*s", pLine->indent, " ");
540
+ }
538541
if( c=='\t' && !p->escHtml ){
539542
blob_append(pCol, " ", 1);
540543
while( (k&7)!=7 && (p->escHtml || k<w) ){
541544
blob_append(pCol, " ", 1);
542545
k++;
@@ -560,11 +563,11 @@
560563
blob_append(pCol, "</span>", 7);
561564
}
562565
if( col==SBS_TXTB ){
563566
sbsWriteNewlines(p);
564567
}else if( !p->escHtml ){
565
- sbsWriteSpace(p, w-k, SBS_TXTA);
568
+ sbsWriteSpace(p, w-k-pLine->indent, SBS_TXTA);
566569
}
567570
}
568571
569572
/*
570573
** Append a column to the final output blob.
571574
--- 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 @@
11021102
*/
11031103
void diff_cmd(void){
11041104
int isGDiff; /* True for gdiff. False for normal diff */
11051105
int isInternDiff; /* True for internal diff */
11061106
int verboseFlag; /* True if -v or --verbose flag is used */
1107
- const char *zFrom; /* Source version number */
1107
+ const char *zFrom; /* Source version number */
11081108
const char *zTo; /* Target version number */
11091109
const char *zBranch; /* Branch to diff */
11101110
const char *zDiffCmd = 0; /* External diff command. NULL for internal diff */
11111111
const char *zBinGlob = 0; /* Treat file names matching this as binary */
11121112
int fIncludeBinary = 0; /* Include binary files for external diff */
11131113
--- 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

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button