diff --git a/.config/tmux/tmux.conf b/.config/tmux/tmux.conf index d215acd..664bf28 100644 --- a/.config/tmux/tmux.conf +++ b/.config/tmux/tmux.conf @@ -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