Fossil SCM
Retain tab characters in HTML side-by-side diffs. Display should be unchanged (still mod-8 indentation).
Commit
f3410724537cbe8d65748c63245de8cd6dee56a3
Parent
a6c96aea6b61f61…
2 files changed
+1
-1
+1
+1
-1
| --- src/diff.c | ||
| +++ src/diff.c | ||
| @@ -510,11 +510,11 @@ | ||
| 510 | 510 | p->iEnd = p->iEnd2; |
| 511 | 511 | p->iEnd2 = 0; |
| 512 | 512 | } |
| 513 | 513 | } |
| 514 | 514 | } |
| 515 | - if( c=='\t' ){ | |
| 515 | + if( c=='\t' && !p->escHtml ){ | |
| 516 | 516 | blob_append(pCol, " ", 1); |
| 517 | 517 | while( (k&7)!=7 && (p->escHtml || k<w) ){ |
| 518 | 518 | blob_append(pCol, " ", 1); |
| 519 | 519 | k++; |
| 520 | 520 | } |
| 521 | 521 |
| --- src/diff.c | |
| +++ src/diff.c | |
| @@ -510,11 +510,11 @@ | |
| 510 | p->iEnd = p->iEnd2; |
| 511 | p->iEnd2 = 0; |
| 512 | } |
| 513 | } |
| 514 | } |
| 515 | if( c=='\t' ){ |
| 516 | blob_append(pCol, " ", 1); |
| 517 | while( (k&7)!=7 && (p->escHtml || k<w) ){ |
| 518 | blob_append(pCol, " ", 1); |
| 519 | k++; |
| 520 | } |
| 521 |
| --- src/diff.c | |
| +++ src/diff.c | |
| @@ -510,11 +510,11 @@ | |
| 510 | p->iEnd = p->iEnd2; |
| 511 | p->iEnd2 = 0; |
| 512 | } |
| 513 | } |
| 514 | } |
| 515 | if( c=='\t' && !p->escHtml ){ |
| 516 | blob_append(pCol, " ", 1); |
| 517 | while( (k&7)!=7 && (p->escHtml || k<w) ){ |
| 518 | blob_append(pCol, " ", 1); |
| 519 | k++; |
| 520 | } |
| 521 |
+1
| --- src/diffcmd.c | ||
| +++ src/diffcmd.c | ||
| @@ -857,10 +857,11 @@ | ||
| 857 | 857 | @ $ln tag config - -justify right |
| 858 | 858 | @ |
| 859 | 859 | @ set txt .txt$side |
| 860 | 860 | @ text $txt -width $CFG(WIDTH) -height $CFG(HEIGHT) -wrap none \ |
| 861 | 861 | @ -xscroll "sync-x $syncCol" |
| 862 | +@ catch {$txt config -tabstyle wordprocessor} ;# Required for Tk>=8.5 | |
| 862 | 863 | @ foreach tag {add rm chng} { |
| 863 | 864 | @ $txt tag config $tag -background $CFG([string toupper $tag]_BG) |
| 864 | 865 | @ $txt tag lower $tag |
| 865 | 866 | @ } |
| 866 | 867 | @ $txt tag config fn -background $CFG(FN_BG) -foreground $CFG(FN_FG) \ |
| 867 | 868 |
| --- src/diffcmd.c | |
| +++ src/diffcmd.c | |
| @@ -857,10 +857,11 @@ | |
| 857 | @ $ln tag config - -justify right |
| 858 | @ |
| 859 | @ set txt .txt$side |
| 860 | @ text $txt -width $CFG(WIDTH) -height $CFG(HEIGHT) -wrap none \ |
| 861 | @ -xscroll "sync-x $syncCol" |
| 862 | @ foreach tag {add rm chng} { |
| 863 | @ $txt tag config $tag -background $CFG([string toupper $tag]_BG) |
| 864 | @ $txt tag lower $tag |
| 865 | @ } |
| 866 | @ $txt tag config fn -background $CFG(FN_BG) -foreground $CFG(FN_FG) \ |
| 867 |
| --- src/diffcmd.c | |
| +++ src/diffcmd.c | |
| @@ -857,10 +857,11 @@ | |
| 857 | @ $ln tag config - -justify right |
| 858 | @ |
| 859 | @ set txt .txt$side |
| 860 | @ text $txt -width $CFG(WIDTH) -height $CFG(HEIGHT) -wrap none \ |
| 861 | @ -xscroll "sync-x $syncCol" |
| 862 | @ catch {$txt config -tabstyle wordprocessor} ;# Required for Tk>=8.5 |
| 863 | @ foreach tag {add rm chng} { |
| 864 | @ $txt tag config $tag -background $CFG([string toupper $tag]_BG) |
| 865 | @ $txt tag lower $tag |
| 866 | @ } |
| 867 | @ $txt tag config fn -background $CFG(FN_BG) -foreground $CFG(FN_FG) \ |
| 868 |