gitk: Enable mouse horizontal scrolling in diff pane
[gitweb.git] / gitk
diff --git a/gitk b/gitk
index 462f966948f287d478518ebc3cfbe322cc9f2e86..d42f28340f717410c2600cb18c53b1817ea9f240 100755 (executable)
--- a/gitk
+++ b/gitk
@@ -2516,6 +2516,13 @@ proc makewindow {} {
     } else {
        bindall <ButtonRelease-4> "allcanvs yview scroll -5 units"
        bindall <ButtonRelease-5> "allcanvs yview scroll 5 units"
+       bind $ctext <Button> {
+           if {"%b" eq 6} {
+               $ctext xview scroll -5 units
+           } elseif {"%b" eq 7} {
+               $ctext xview scroll 5 units
+           }
+       }
         if {[tk windowingsystem] eq "aqua"} {
             bindall <MouseWheel> {
                 set delta [expr {- (%D)}]