Focus Runner w/o Zooming - Bang Style (#94)

Add bang param on VtrFocusRunner to not zoom the focused pane
This commit is contained in:
Gabe Dunn 2019-10-13 08:27:58 -07:00 committed by Chris Toomey
parent 436b17e62d
commit 38d923977c
2 changed files with 9 additions and 6 deletions

View File

@ -146,9 +146,10 @@ pane.
*VtrFocusRunner*
2.5 VtrFocusRunner~
Move the cursor to the runner to interact directly with it. A new runner will
be created if one does not exist and a detached pane will be restored as
needed.
Move the cursor to the runner to interact directly with it and zooms the
pane. A new runner will be created if one does not exist and a detached
pane will be restored as needed. To not zoom the runner pane, add a bang:
VtrFocusRunner!.
------------------------------------------------------------------------------
*VtrResizeRunner*

View File

@ -145,10 +145,12 @@ function! s:RunnerPaneDimensions()
endfor
endfunction
function! s:FocusRunnerPane()
function! s:FocusRunnerPane(should_zoom)
if !s:ValidRunnerPaneSet() | return | endif
call s:FocusTmuxPane(s:runner_pane)
if a:should_zoom
call s:SendTmuxCommand("resize-pane -Z")
endif
endfunction
function! s:Strip(string)
@ -471,7 +473,7 @@ function! s:DefineCommands()
command! -bang VtrSendFile call s:SendFileViaVtr(<bang>0)
command! -nargs=? VtrOpenRunner call s:EnsureRunnerPane(<args>)
command! VtrKillRunner call s:KillRunnerPane()
command! VtrFocusRunner call s:FocusRunnerPane()
command! -bang VtrFocusRunner call s:FocusRunnerPane(<bang>!0)
command! VtrReorientRunner call s:ReorientRunner()
command! VtrDetachRunner call s:DetachRunnerPane()
command! VtrReattachRunner call s:ReattachPane()