summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2007-09-26 18:16:45 (GMT)
committerShawn O. Pearce <spearce@spearce.org>2007-09-26 18:16:45 (GMT)
commit59213f60b7a3085732f76736e1826869994abf1a (patch)
tree7d2437acb708af9feec242c94b4e00543adb3ea2 /lib
parent6f2d73ec0cb6d5937bb4a62a222f942e4f886d6e (diff)
downloadgit-59213f60b7a3085732f76736e1826869994abf1a.zip
git-59213f60b7a3085732f76736e1826869994abf1a.tar.gz
git-59213f60b7a3085732f76736e1826869994abf1a.tar.bz2
git-gui: Don't delete scrollbars in console windows
If we have added a scrollbar to the console window because one direction has too much text to fit in the available screen space we should just keep the scrollbars. Its annoying to watch our horizontal scrollbar bounce in and out of the window as additional text is inserted into the widget and the need for the scrollbar comes and goes. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/console.tcl10
1 files changed, 2 insertions, 8 deletions
diff --git a/lib/console.tcl b/lib/console.tcl
index c0e6fb3..2075374 100644
--- a/lib/console.tcl
+++ b/lib/console.tcl
@@ -202,14 +202,8 @@ method done {ok} {
}
method _sb_set {sb orient first last} {
- if {$first == 0 && $last == 1} {
- if {[winfo exists $sb]} {
- destroy $sb
- }
- return
- }
-
if {![winfo exists $sb]} {
+ if {$first == $last || ($first == 0 && $last == 1)} return
if {$orient eq {h}} {
scrollbar $sb -orient h -command [list $w_t xview]
pack $sb -fill x -side bottom -before $w_t
@@ -218,7 +212,7 @@ method _sb_set {sb orient first last} {
pack $sb -fill y -side right -before $w_t
}
}
- catch {$sb set $first $last}
+ $sb set $first $last
}
}