Fossil SCM

Do not pad lines of the Tk diff view with spaces.

drh 2013-07-09 12:05 UTC backed-out
Commit 0a869bebc24f689b725f780b0036d76ab90c666d
1 file changed -25
--- src/diffcmd.c
+++ src/diffcmd.c
@@ -709,20 +709,10 @@
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.
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
-@ $c insert $ln.end [string repeat " " [expr {$width-$len}]] ws
721
-@ }
722
-@ }
723
-@
724714
@ foreach c [cols] {
725715
@ $c config -state disabled
726716
@ }
727717
@ }
728718
@
@@ -743,23 +733,10 @@
743733
@ $sb set $first $last
744734
@ }
745735
@ }
746736
@ }
747737
@
748
-@ proc copyText {c} {
749
-@ set txt ""
750
-@ # Copy selection without excess trailing whitespace
751
-@ $c tag config ws -elide 1
752
-@ catch {
753
-@ $c tag add sel sel.first sel.last
754
-@ set txt [selection get]
755
-@ }
756
-@ $c tag config ws -elide 0
757
-@ clipboard clear
758
-@ clipboard append $txt
759
-@ }
760
-@
761738
@ wm withdraw .
762739
@ wm title . $CFG(TITLE)
763740
@ wm iconname . $CFG(TITLE)
764741
@ bind . <q> exit
765742
@ bind . <Tab> {cycleDiffs; break}
@@ -801,12 +778,10 @@
801778
@ -xscroll {scrollSync x {.sbxA .sbxB}}
802779
@ foreach tag {add rm chng} {
803780
@ $txt tag config $tag -background $CFG([string toupper $tag]_BG)
804781
@ $txt tag lower $tag
805782
@ }
806
-@ bind $txt <<Copy>> {copyText %W; break}
807
-@ bind $txt <<Cut>> {copyText %W; break}
808783
@ }
809784
@ text .mkr
810785
@
811786
@ font create mono -family courier -size $CFG(FONT_SIZE)
812787
@ foreach font $CFG(FONTS) {
813788
--- src/diffcmd.c
+++ src/diffcmd.c
@@ -709,20 +709,10 @@
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 @ $c insert $ln.end [string repeat " " [expr {$width-$len}]] ws
721 @ }
722 @ }
723 @
724 @ foreach c [cols] {
725 @ $c config -state disabled
726 @ }
727 @ }
728 @
@@ -743,23 +733,10 @@
743 @ $sb set $first $last
744 @ }
745 @ }
746 @ }
747 @
748 @ proc copyText {c} {
749 @ set txt ""
750 @ # Copy selection without excess trailing whitespace
751 @ $c tag config ws -elide 1
752 @ catch {
753 @ $c tag add sel sel.first sel.last
754 @ set txt [selection get]
755 @ }
756 @ $c tag config ws -elide 0
757 @ clipboard clear
758 @ clipboard append $txt
759 @ }
760 @
761 @ wm withdraw .
762 @ wm title . $CFG(TITLE)
763 @ wm iconname . $CFG(TITLE)
764 @ bind . <q> exit
765 @ bind . <Tab> {cycleDiffs; break}
@@ -801,12 +778,10 @@
801 @ -xscroll {scrollSync x {.sbxA .sbxB}}
802 @ foreach tag {add rm chng} {
803 @ $txt tag config $tag -background $CFG([string toupper $tag]_BG)
804 @ $txt tag lower $tag
805 @ }
806 @ bind $txt <<Copy>> {copyText %W; break}
807 @ bind $txt <<Cut>> {copyText %W; break}
808 @ }
809 @ text .mkr
810 @
811 @ font create mono -family courier -size $CFG(FONT_SIZE)
812 @ foreach font $CFG(FONTS) {
813
--- src/diffcmd.c
+++ src/diffcmd.c
@@ -709,20 +709,10 @@
709 @
710 @ foreach c {.lnA .lnB .mkr} {
711 @ $c config -width $gDiffs($idx,[colType $c]-width)
712 @ }
713 @
 
 
 
 
 
 
 
 
 
 
714 @ foreach c [cols] {
715 @ $c config -state disabled
716 @ }
717 @ }
718 @
@@ -743,23 +733,10 @@
733 @ $sb set $first $last
734 @ }
735 @ }
736 @ }
737 @
 
 
 
 
 
 
 
 
 
 
 
 
 
738 @ wm withdraw .
739 @ wm title . $CFG(TITLE)
740 @ wm iconname . $CFG(TITLE)
741 @ bind . <q> exit
742 @ bind . <Tab> {cycleDiffs; break}
@@ -801,12 +778,10 @@
778 @ -xscroll {scrollSync x {.sbxA .sbxB}}
779 @ foreach tag {add rm chng} {
780 @ $txt tag config $tag -background $CFG([string toupper $tag]_BG)
781 @ $txt tag lower $tag
782 @ }
 
 
783 @ }
784 @ text .mkr
785 @
786 @ font create mono -family courier -size $CFG(FONT_SIZE)
787 @ foreach font $CFG(FONTS) {
788

Keyboard Shortcuts

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