Fossil SCM

Retain tab characters in HTML side-by-side diffs. Display should be unchanged (still mod-8 indentation).

joel 2013-07-18 21:11 trunk
Commit f3410724537cbe8d65748c63245de8cd6dee56a3
2 files changed +1 -1 +1
+1 -1
--- src/diff.c
+++ src/diff.c
@@ -510,11 +510,11 @@
510510
p->iEnd = p->iEnd2;
511511
p->iEnd2 = 0;
512512
}
513513
}
514514
}
515
- if( c=='\t' ){
515
+ if( c=='\t' && !p->escHtml ){
516516
blob_append(pCol, " ", 1);
517517
while( (k&7)!=7 && (p->escHtml || k<w) ){
518518
blob_append(pCol, " ", 1);
519519
k++;
520520
}
521521
--- 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
--- src/diffcmd.c
+++ src/diffcmd.c
@@ -857,10 +857,11 @@
857857
@ $ln tag config - -justify right
858858
@
859859
@ set txt .txt$side
860860
@ text $txt -width $CFG(WIDTH) -height $CFG(HEIGHT) -wrap none \
861861
@ -xscroll "sync-x $syncCol"
862
+@ catch {$txt config -tabstyle wordprocessor} ;# Required for Tk>=8.5
862863
@ foreach tag {add rm chng} {
863864
@ $txt tag config $tag -background $CFG([string toupper $tag]_BG)
864865
@ $txt tag lower $tag
865866
@ }
866867
@ $txt tag config fn -background $CFG(FN_BG) -foreground $CFG(FN_FG) \
867868
--- 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

Keyboard Shortcuts

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