gitk: add horizontal scrollbar to the commit list pane

When many branches and tags decorate the same commit, the ref labels push the commit description far to the right, often out of the visible area of the left pane. The canvas widget already tracked the maximum x extent via canvxmax and updated its scrollregion accordingly, but there was no scrollbar wired up to let the user reach that content. Add a horizontal scrollbar (.tf.histframe.cxsb) below the three-pane history area, connected to the left canvas (canv) via its xscrollcommand and xview. No behaviour is changed for the author (canv2) or date (canv3) panes; they continue to scroll only vertically in lock-step as before. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Rob McDonald <rob.a.mcdonald@gmail.com>

Rob McDonald committed Apr 14, 2026 at 09:34 UTC d9ee2ab501089e0ee22305ae99e13c7b730bc798
1 file changed +5 -2
gitk
+5 -2
@@ -2469,7 +2469,8 @@ proc makewindow {} {
2469 -selectbackground $selectbgcolor \
2470 -background $bgcolor -bd 0 \
2471 -xscrollincr $linespc \
2472 - -yscrollincr $linespc -yscrollcommand "scrollcanv $cscroll"
2472 + -yscrollincr $linespc -yscrollcommand "scrollcanv $cscroll" \
2473 + -xscrollcommand ".tf.histframe.cxsb set"
2474 .tf.histframe.pwclist add $canv
2475 set canv2 .tf.histframe.pwclist.canv2
2476 canvas $canv2 \
@@ -2487,9 +2488,11 @@ proc makewindow {} {
2488 .tf.histframe.pwclist sashpos 0 [lindex $::geometry(pwsash0) 0]
2489 }
2490
2490 - # a scroll bar to rule them
2491 + # a scroll bar to rule them (vertical), and one for horizontal scroll of left pane
2492 ttk::scrollbar $cscroll -command {allcanvs yview}
2493 pack $cscroll -side right -fill y
2494 + ttk::scrollbar .tf.histframe.cxsb -orient horizontal -command "$canv xview"
2495 + pack .tf.histframe.cxsb -side bottom -fill x
2496 bind .tf.histframe.pwclist <Configure> {resizeclistpanes %W %w}
2497 lappend bglist $canv $canv2 $canv3
2498 pack .tf.histframe.pwclist -fill both -expand 1 -side left