diff options
author | Gabriele Mazzotta <gabriele.mzt@gmail.com> | 2014-11-15 15:05:06 +0100 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2015-03-02 11:29:59 +1100 |
commit | 122b80799249be33e66a4f716fdca6d80635a05e (patch) | |
tree | 3bf887ed5dd715e7657d695e56b9148de2113d74 | |
parent | gitk: Default wrcomcmd to use --pretty=email (diff) | |
download | tgif-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-x | gitk | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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)}] |