git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] gitk: adding a horizontal scrollbar to the diff window.

From
SHStefan-W. Hahn <stefan.hahn@s-hahn.de>
Date
Feb 24, 2008, 20:08 UTC
Message-ID
<20080224200842.GA8052@scotty.home>

This patch makes the "unvisible horizontal scroll" feature of the diff window visible by adding a horizontal scrollbar at the bottom of that window.

Signed-off-by: Stefan-W. Hahn <stefan.hahn@s-hahn.de>
---
 gitk-git/gitk |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/gitk-git/gitk b/gitk-git/gitk
index f1f21e9..a7087a9 100644
--- a/gitk-git/gitk
+++ b/gitk-git/gitk
@@ -857,14 +857,17 @@ proc makewindow {} {
     set ctext .bleft.ctext
     text $ctext -background $bgcolor -foreground $fgcolor \
 	-state disabled -font textfont \
+	-xscrollcommand ".bleft.xsb set" \
 	-yscrollcommand scrolltext -wrap none
     if {$have_tk85} {
 	$ctext conf -tabstyle wordprocessor
     }
-    scrollbar .bleft.sb -command "$ctext yview"
+    scrollbar .bleft.ysb -command "$ctext yview"
+    scrollbar .bleft.xsb -command "$ctext xview" -orient horizontal
     pack .bleft.top -side top -fill x
     pack .bleft.mid -side top -fill x
-    pack .bleft.sb -side right -fill y
+    pack .bleft.ysb -side right -fill y
+    pack .bleft.xsb -side bottom -fill x
     pack $ctext -side left -fill both -expand 1
     lappend bglist $ctext
     lappend fglist $ctext
@@ -5604,7 +5607,7 @@ proc searchmarkvisible {doall} {
 proc scrolltext {f0 f1} {
     global searchstring
 
-    .bleft.sb set $f0 $f1
+    .bleft.ysb set $f0 $f1
     if {$searchstring ne {}} {
 	searchmarkvisible 0
     }
-- 
1.5.4.2.198.g3f625


-- 
Stefan-W. Hahn                          It is easy to make things.
/ mailto:stefan.hahn@s-hahn.de /        It is hard to make things simple.			

Please note that according to the German law on data retention,
information on every electronic information exchange with me is
retained for a period of six months.
Bundesgesetzblatt:
http://www.bgblportal.de/BGBL/bgbl1f/bgbl107s3198.pdf
Message 1 of 1 in “gitk: adding a horizontal scrollbar to the diff window.”
  1. gitk: adding a horizontal scrollbar to the diff window.Stefan-W. Hahn, Feb 24, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.