diff options
author | Bert Wesarg <bert.wesarg@googlemail.com> | 2019-09-13 22:16:28 +0200 |
---|---|---|
committer | Pratyush Yadav <me@yadavpratyush.com> | 2019-09-14 02:13:25 +0530 |
commit | da08d559b714016af532594083fe96120b36f58d (patch) | |
tree | 5097c3c77458f22b139b1aede482e7d906ce5b12 | |
parent | Merge remote-tracking branch 'philoakley/dup-gui' (diff) | |
download | tgif-da08d559b714016af532594083fe96120b36f58d.tar.xz |
git-gui: add horizontal scrollbar to commit buffer
While the commit message widget has a configurable fixed width, it
nevertheless allowed to write commit messages which exceeded this limit.
Though there is no visual clue, that there is scrolling going on. Now
there is a horizontal scrollbar.
There seems to be a bug in at least Tcl/Tk up to version 8.6.8, which
does not update the horizontal scrollbar if one removes the whole
content at once.
Suggested-by: Birger Skogeng Pedersen <birger.sp@gmail.com>
Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
Signed-off-by: Pratyush Yadav <me@yadavpratyush.com>
-rwxr-xr-x | git-gui.sh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/git-gui.sh b/git-gui.sh index 5bc21b878d..ad962d4fbe 100755 --- a/git-gui.sh +++ b/git-gui.sh @@ -3363,10 +3363,16 @@ ttext $ui_comm -background white -foreground black \ -relief sunken \ -width $repo_config(gui.commitmsgwidth) -height 9 -wrap none \ -font font_diff \ + -xscrollcommand {.vpane.lower.commarea.buffer.frame.sbx set} \ -yscrollcommand {.vpane.lower.commarea.buffer.frame.sby set} +${NS}::scrollbar .vpane.lower.commarea.buffer.frame.sbx \ + -orient horizontal \ + -command [list $ui_comm xview] ${NS}::scrollbar .vpane.lower.commarea.buffer.frame.sby \ + -orient vertical \ -command [list $ui_comm yview] +pack .vpane.lower.commarea.buffer.frame.sbx -side bottom -fill x pack .vpane.lower.commarea.buffer.frame.sby -side right -fill y pack $ui_comm -side left -fill y pack .vpane.lower.commarea.buffer.header -side top -fill x |