summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Gabriele Mazzotta <gabriele.mzt@gmail.com>2014-11-15 15:05:06 +0100
committerLibravatar Paul Mackerras <paulus@samba.org>2015-03-02 11:29:59 +1100
commit122b80799249be33e66a4f716fdca6d80635a05e (patch)
tree3bf887ed5dd715e7657d695e56b9148de2113d74
parentgitk: Default wrcomcmd to use --pretty=email (diff)
downloadtgif-122b80799249be33e66a4f716fdca6d80635a05e.tar.xz
gitk: Enable mouse horizontal scrolling in diff pane
Currently it's required to hold Shift and scroll up and down to move horizontally. Listen to Button-6 and Button-7 events too to make horizontal scrolling handier with touchpads and some mice. Signed-off-by: Gabriele Mazzotta <gabriele.mzt@gmail.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
-rwxr-xr-xgitk7
1 files changed, 7 insertions, 0 deletions
diff --git a/gitk b/gitk
index 462f966948..d42f28340f 100755
--- 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)}]