Tmux offers a -Z option on the select-pane command that preserves the zoom state when navigating between panes. This PR adds an option to enable this behavior in vim-tmux-navigator.
Rationale: I often like to run tmux with two stacked panes, Vim on top and a shell below. I often keep Vim zoomed and want to briefly pop into the shell before going back to Vim, all while staying zoomed.
From tmux(1):
select-pane [-DdeLlMmRUZ] [-T title] [-t target-pane]
[...snip...]
-Z keeps the window zoomed if it was zoomed.
Note that when g:tmux_navigator_preserve_zoom is enabled, the -Z flag is always passed to select-pane, regardless of zoom state. This is safe because it has no effect while not zoomed.
Tmux offers a
-Z
option on theselect-pane
command that preserves the zoom state when navigating between panes. This PR adds an option to enable this behavior in vim-tmux-navigator.Rationale: I often like to run tmux with two stacked panes, Vim on top and a shell below. I often keep Vim zoomed and want to briefly pop into the shell before going back to Vim, all while staying zoomed.
From
tmux(1)
:Note that when
g:tmux_navigator_preserve_zoom
is enabled, the-Z
flag is always passed toselect-pane
, regardless of zoom state. This is safe because it has no effect while not zoomed.