tmux: Fix window reordering >3.4

This commit is contained in:
2025-03-24 18:34:20 +01:00
parent 597f86b4fd
commit a396df8cea

View File

@@ -167,7 +167,18 @@ bind -r N swap-window -d -t :+1
bind -r P swap-window -d -t :-1
# Reorder windows by dragging them in the status line.
bind -n MouseDrag1Status swap-window -d -t=
# NOTE: Omitting the source from 3.4 on (after 8636848e6348) will do nothing, as
# the source is then implied to be the window that the mouse is currently
# on (i.e. also the target)
# TODO: comment on tmux issue #656
if -F "#{>=:#{version},3.4}" {
# TODO: why does this not work <3.4?
bind -n MouseDrag1Status swap-window -d -s"" -t=
} {
bind -n MouseDrag1Status swap-window -d -t=
# TODO: why does this not work >=3.4?
# bind -n MouseDrag1Status swap-window -d -s":" -t=
}
# Move a window to the first or very last position
# TODO: do nothing on drags that don't start on a window name