@matheusbsbs / matheus-bagliano / commits / bbbadf6e58
Fork 0

git-gui: Don't display CR within console windows

Git progress bars from tools like git-push and git-fetch use CR to skip back to the start of the current line and redraw it with an updated progress. We were doing this in our Tk widget but had failed to skip the CR, which Tk doesn't draw well. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

Shawn O. Pearce committed Oct 20, 2007 at 20:42 UTC bbbadf6e58f72ac6bf739d2a1109cbd872eb1083
1 file changed +1 -1
lib/console.tcl
+1 -1
@@ -122,7 +122,7 @@ method _read {fd after} {
122 } else {
123 $w.m.t delete $console_cr end
124 $w.m.t insert end "\n"
125 - $w.m.t insert end [string range $buf $c $cr]
125 + $w.m.t insert end [string range $buf $c [expr {$cr - 1}]]
126 set c $cr
127 incr c
128 }