Merge lp:~chrisccoulson/byobu/fix-tmux-swap-window-usage into lp:byobu

Proposed by Chris Coulson on 2020-01-31
Status: Merged
Merged at revision: 2633
Proposed branch: lp:~chrisccoulson/byobu/fix-tmux-swap-window-usage
Merge into: lp:byobu
Diff against target: 14 lines (+2/-2)
1 file modified
usr/share/byobu/keybindings/f-keys.tmux (+2/-2)
To merge this branch: bzr merge lp:~chrisccoulson/byobu/fix-tmux-swap-window-usage
Reviewer Review Type Date Requested Status
Dustin Kirkland  2020-01-31 Pending
Review via email:

Commit message

Update usage of tmux swap-window so that focus stays with the original window.

See for more context. The "swap-window" command now needs the "-d" argument so that focus follows the original window.

Description of the change

Since upgrading from tmux 2.9a (in eoan) to tmux 3.0a (in focal), the CTRL+SHIFT+F3/F4 shortcuts no longer behave as they did previously - the windows are swapped, but focus doesn't move to the originally focused window. Eg, if I have 2 windows (A and B) with A being the currently focused window, and then I use CTRL+SHIFT+F4 to swap them, I end up with windows B and A (as expected), but window B is focused when I expected the focus to follow window A (as it did with tmux 2.9a).

This appears to be a breaking change in tmux -

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'usr/share/byobu/keybindings/f-keys.tmux'
2--- usr/share/byobu/keybindings/f-keys.tmux 2019-05-26 19:10:55 +0000
3+++ usr/share/byobu/keybindings/f-keys.tmux 2020-01-31 15:14:39 +0000
4@@ -46,8 +46,8 @@
5 bind-key -n S-Right display-panes \; select-pane -R
6 bind-key -n C-F3 display-panes \; swap-pane -s :. -t :.- \; select-pane -t :.-
7 bind-key -n C-F4 display-panes \; swap-pane -s :. -t :.+ \; select-pane -t :.+
8-bind-key -n C-S-F3 swap-window -t :-1
9-bind-key -n C-S-F4 swap-window -t :+1
10+bind-key -n C-S-F3 swap-window -t :-1 -d
11+bind-key -n C-S-F4 swap-window -t :+1 -d
12 bind-key -n M-S-Up resize-pane -U
13 bind-key -n M-S-Down resize-pane -D
14 bind-key -n M-S-Left resize-pane -L


People subscribed via source and target branches