File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -140,19 +140,16 @@ endfunction
140140
141141function ! VimuxZoomRunner () abort
142142 if s: hasRunner ()
143- if VimuxOption (' VimuxRunnerType' ) == # ' pane'
144- call VimuxTmux (' resize-pane -Z -t ' .g: VimuxRunnerIndex )
145- elseif VimuxOption (' VimuxRunnerType' ) == # ' window'
146- call VimuxTmux (' select-window -t ' .g: VimuxRunnerIndex )
147- endif
143+ call s: selectRunner ()
144+ call VimuxTmux (' resize-pane -Z -t ' .g: VimuxRunnerIndex )
148145 else
149146 call s: echoNoRunner ()
150147 endif
151148endfunction
152149
153150function ! VimuxInspectRunner () abort
154151 if s: hasRunner ()
155- call VimuxTmux ( ' select- ' . VimuxOption ( ' VimuxRunnerType ' ). ' -t ' . g: VimuxRunnerIndex )
152+ call s: selectRunner ( )
156153 call VimuxTmux (' copy-mode' )
157154 return v: true
158155 endif
@@ -228,6 +225,11 @@ function! VimuxTmux(arguments) abort
228225 endif
229226endfunction
230227
228+ function ! s: selectRunner () abort
229+ call VimuxTmux (' select-window -t ' .g: VimuxRunnerIndex )
230+ call VimuxTmux (' select-pane -t ' .g: VimuxRunnerIndex )
231+ endfunction
232+
231233function ! s: exitCopyMode () abort
232234 try
233235 call VimuxTmux (' copy-mode -q -t ' .g: VimuxRunnerIndex )
@@ -308,6 +310,8 @@ function! s:getTargetFilter() abort
308310endfunction
309311
310312function ! s: setRunnerName () abort
313+ " To be called only while the runner is active, including its window and
314+ " session
311315 let targetName = VimuxOption (' VimuxRunnerName' )
312316 if targetName == # ' '
313317 return
You can’t perform that action at this time.
0 commit comments