mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Bert Wesarg <>
Cc: Bert Wesarg <>,
	Pratyush Yadav <>,
	Johannes Sixt <>,
	Birger Skogeng Pedersen <>
Subject: [PATCH] git-gui: add horizontal scrollbar to commit buffer
Date: Thu, 12 Sep 2019 21:20:47 +0200	[thread overview]
Message-ID: <> (raw)

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 <>
Signed-off-by: Bert Wesarg <>
--- | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/ b/
index 5bc21b8..032ebd6 100755
--- a/
+++ b/
@@ -3363,14 +3363,20 @@ 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 $ui_comm -side left -fill both -expand 1
 pack .vpane.lower.commarea.buffer.header -side top -fill x
-pack .vpane.lower.commarea.buffer.frame -side left -fill y
+pack .vpane.lower.commarea.buffer.frame -side bottom -fill both -expand 1
 pack .vpane.lower.commarea.buffer -side left -fill y
 # -- Commit Message Buffer Context Menu

             reply	other threads:[~2019-09-12 19:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-12 19:20 Bert Wesarg [this message]
2019-09-13 18:53 ` [PATCH] git-gui: add horizontal scrollbar to commit buffer Pratyush Yadav
2019-09-13 20:15   ` Bert Wesarg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

  List information:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).