@@ -111,7 +111,10 @@ function! VimuxOpenRunner() abort
111111 call VimuxTmux (' new-window ' .extraArguments)
112112 endif
113113 let g: VimuxRunnerIndex = s: tmuxProperty (' #{pane_id}' )
114- call s: setRunnerName ()
114+ let targetName = VimuxOption (' VimuxRunnerName' )
115+ if targetName !=# ' '
116+ call VimuxTmux (' select-pane -T ' .targetName)
117+ endif
115118 call VimuxTmux (' last-' .VimuxOption (' VimuxRunnerType' ))
116119 endif
117120endfunction
@@ -283,7 +286,7 @@ function! s:nearestRunnerId() abort
283286 let views = split (
284287 \ VimuxTmux (
285288 \ ' list-' .runnerType.' s'
286- \ ." -F '#{" .runnerType.' _active}:#{' .runnerType. " _id}' "
289+ \ ." -F '#{" .runnerType.' _active}:#{pane_id}" '
287290 \ .filter ),
288291 \ ' \n' )
289292 " '1:' is the current active pane (the one with vim).
@@ -309,21 +312,6 @@ function! s:getTargetFilter() abort
309312 endif
310313endfunction
311314
312- function ! s: setRunnerName () abort
313- " To be called only while the runner is active, including its window and
314- " session
315- let targetName = VimuxOption (' VimuxRunnerName' )
316- if targetName == # ' '
317- return
318- endif
319- let runnerType = VimuxOption (' VimuxRunnerType' )
320- if runnerType == # ' window'
321- call VimuxTmux (' rename-window ' .targetName)
322- elseif runnerType == # ' pane'
323- call VimuxTmux (' select-pane -T ' .targetName)
324- endif
325- endfunction
326-
327315function ! s: tmuxProperty (property) abort
328316 return substitute (VimuxTmux (" display -p '" .a: property ." '" ), ' \n$' , ' ' , ' ' )
329317endfunction
0 commit comments