tmux: Use C-[ey] for scrolling with the wheel

This commit is contained in:
2024-10-14 09:38:08 +02:00
parent 9bc59bec72
commit aa901099b0

View File

@@ -70,19 +70,20 @@ bind -n WheelUpPane {
if -F "#{alternate_on}" {
send -N5 up
} {
copy-mode; send -XN5 scroll-up
copy-mode
send -N5 C-y
}
}
}
# Scroll without selecting the pane
bind -T copy-mode-vi WheelUpPane send -XN5 scroll-up
bind -T copy-mode-vi WheelUpPane send -N5 C-y
# Exit copy-mode when at the bottom. This practically mimics `copy-mode -e` but
# only scrolling with the wheel (`-e` annoys me when scrolling down with `C-d`).
bind -T copy-mode-vi WheelDownPane {
if -F "#{==:0,#{scroll_position}}" {
send -X cancel
} {
send -XN5 scroll-down
send -N5 C-e
}
}