Fossil SCM

Add better comment explaining why .txtA/.txtB lines are padded with spaces.

joel 2013-07-09 20:51 UTC sbsreloaded
Commit 2d8f2b4e246ff96896d2b61b9d07086b2cced37c
1 file changed +6 -1
+6 -1
--- src/diffcmd.c
+++ src/diffcmd.c
@@ -709,11 +709,16 @@
709709
@
710710
@ foreach c {.lnA .lnB .mkr} {
711711
@ $c config -width $gDiffs($idx,[colType $c]-width)
712712
@ }
713713
@
714
-@ # Add whitespace to equalize line lengths.
714
+@ # Add whitespace to equalize line lengths. This is done in order to:
715
+@ # (a) scroll to the same horizontal position on both sides and
716
+@ # (b) keep the horizontal scrollbars from changing position/size as
717
+@ # you scroll vertically.
718
+@ # To test, try "fossil diff --tk --from d7afa8f153 --to abe1030ca8"
719
+@ # as well as its inverse.
715720
@ regexp {\d+} [.txtA index {end -1c}] numLines
716721
@ set width $gDiffs($idx,txt-width)
717722
@ foreach c {.txtA .txtB} {
718723
@ for {set ln 1} {$ln <= $numLines} {incr ln} {
719724
@ regexp {\d+$} [$c index $ln.end] len
720725
--- src/diffcmd.c
+++ src/diffcmd.c
@@ -709,11 +709,16 @@
709 @
710 @ foreach c {.lnA .lnB .mkr} {
711 @ $c config -width $gDiffs($idx,[colType $c]-width)
712 @ }
713 @
714 @ # Add whitespace to equalize line lengths.
 
 
 
 
 
715 @ regexp {\d+} [.txtA index {end -1c}] numLines
716 @ set width $gDiffs($idx,txt-width)
717 @ foreach c {.txtA .txtB} {
718 @ for {set ln 1} {$ln <= $numLines} {incr ln} {
719 @ regexp {\d+$} [$c index $ln.end] len
720
--- src/diffcmd.c
+++ src/diffcmd.c
@@ -709,11 +709,16 @@
709 @
710 @ foreach c {.lnA .lnB .mkr} {
711 @ $c config -width $gDiffs($idx,[colType $c]-width)
712 @ }
713 @
714 @ # Add whitespace to equalize line lengths. This is done in order to:
715 @ # (a) scroll to the same horizontal position on both sides and
716 @ # (b) keep the horizontal scrollbars from changing position/size as
717 @ # you scroll vertically.
718 @ # To test, try "fossil diff --tk --from d7afa8f153 --to abe1030ca8"
719 @ # as well as its inverse.
720 @ regexp {\d+} [.txtA index {end -1c}] numLines
721 @ set width $gDiffs($idx,txt-width)
722 @ foreach c {.txtA .txtB} {
723 @ for {set ln 1} {$ln <= $numLines} {incr ln} {
724 @ regexp {\d+$} [$c index $ln.end] len
725

Keyboard Shortcuts

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