Skip to content

Commit da08d55

Browse files
bertwesargprati0100
authored andcommitted
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 <[email protected]> Signed-off-by: Bert Wesarg <[email protected]> Signed-off-by: Pratyush Yadav <[email protected]>
1 parent 5ab7227 commit da08d55

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

git-gui.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3363,10 +3363,16 @@ ttext $ui_comm -background white -foreground black \
33633363
-relief sunken \
33643364
-width $repo_config(gui.commitmsgwidth) -height 9 -wrap none \
33653365
-font font_diff \
3366+
-xscrollcommand {.vpane.lower.commarea.buffer.frame.sbx set} \
33663367
-yscrollcommand {.vpane.lower.commarea.buffer.frame.sby set}
3368+
${NS}::scrollbar .vpane.lower.commarea.buffer.frame.sbx \
3369+
-orient horizontal \
3370+
-command [list $ui_comm xview]
33673371
${NS}::scrollbar .vpane.lower.commarea.buffer.frame.sby \
3372+
-orient vertical \
33683373
-command [list $ui_comm yview]
33693374
3375+
pack .vpane.lower.commarea.buffer.frame.sbx -side bottom -fill x
33703376
pack .vpane.lower.commarea.buffer.frame.sby -side right -fill y
33713377
pack $ui_comm -side left -fill y
33723378
pack .vpane.lower.commarea.buffer.header -side top -fill x

0 commit comments

Comments
 (0)