tmux: Select last window with prefix+[0-9] too

This is already the case with M-[0-9].

prefix+0 was also still selecting window 0.
This commit is contained in:
2025-01-22 14:52:14 +01:00
parent fde6aa06a4
commit c093a4ea37

View File

@@ -176,6 +176,19 @@ bind -n MouseDragEnd1StatusDefault {
bind -r \{ swap-pane -U bind -r \{ swap-pane -U
bind -r \} swap-pane -D bind -r \} swap-pane -D
# Select last window if target is current
bind 1 select-window -T -t 1
bind 2 select-window -T -t 2
bind 3 select-window -T -t 3
bind 4 select-window -T -t 4
bind 5 select-window -T -t 5
bind 6 select-window -T -t 6
bind 7 select-window -T -t 7
bind 8 select-window -T -t 8
bind 9 select-window -T -t 9
# Since base-index == 1, 0 should go to window 10
bind 0 select-window -T -t 10
# Select windows with Alt-[0-9], select last window if target is current # Select windows with Alt-[0-9], select last window if target is current
bind -n M-1 select-window -T -t 1 bind -n M-1 select-window -T -t 1
bind -n M-2 select-window -T -t 2 bind -n M-2 select-window -T -t 2