summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6f2d73e)
raw | patch | inline | side by side (parent: 6f2d73e)
author | Shawn O. Pearce <spearce@spearce.org> | |
Wed, 26 Sep 2007 18:16:45 +0000 (14:16 -0400) | ||
committer | Shawn O. Pearce <spearce@spearce.org> | |
Wed, 26 Sep 2007 18:16:45 +0000 (14:16 -0400) |
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>
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>
lib/console.tcl | patch | blob | history |
diff --git a/lib/console.tcl b/lib/console.tcl
index c0e6fb3cc2fe9cb66e114d4998b2e91d65548980..2075374683a49dd8a955e52c76d951ec3013536b 100644 (file)
--- a/lib/console.tcl
+++ b/lib/console.tcl
}
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
pack $sb -fill y -side right -before $w_t
}
}
- catch {$sb set $first $last}
+ $sb set $first $last
}
}