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>
This commit is contained in:
parent
e203d1dcba
commit
122b807992
7
gitk
7
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)}]
|
||||
|
Loading…
Reference in New Issue
Block a user