Skip to content

Commit 58d009a

Browse files
committed
fix: respect value of g:VimuxRunnerIndex and look for valid pane runner
1 parent 04f299e commit 58d009a

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

plugin/vimux.vim

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ function! VimuxOpenRunner() abort
101101
return
102102
endif
103103
let existingId = s:existingRunnerId()
104-
if existingId !=# ''
104+
if !exists('g:VimuxRunnerIndex') && existingId !=# ''
105105
let g:VimuxRunnerIndex = existingId
106106
else
107107
let extraArguments = VimuxOption('VimuxOpenExtraArgs')
@@ -355,10 +355,8 @@ function! s:hasRunner() abort
355355
if get(g:, 'VimuxRunnerIndex', '') ==? ''
356356
return v:false
357357
endif
358-
let l:runnerType = VimuxOption('VimuxRunnerType')
359-
let l:command = 'list-'.runnerType."s -F '#{".runnerType."_id}'"
360-
let l:found = match(VimuxTmux(l:command), g:VimuxRunnerIndex)
361-
return l:found != -1
358+
let runnerType = VimuxOption('VimuxRunnerType')
359+
return match(VimuxTmux('list-'.runnerType."s -a -F '#{".runnerType."_id}'"), g:VimuxRunnerIndex)
362360
endfunction
363361

364362
function! s:autoclose() abort

0 commit comments

Comments
 (0)