Skip to content

Commit c844c7f

Browse files
committed
fix: respect value of g:VimuxRunnerIndex and look for valid pane runner
1 parent 7db6b2f commit c844c7f

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

plugin/vimux.vim

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ endfunction
9696

9797
function! VimuxOpenRunner() abort
9898
let existingId = s:existingRunnerId()
99-
if existingId !=# ''
99+
if !exists('g:VimuxRunnerIndex') && existingId !=# ''
100100
let g:VimuxRunnerIndex = existingId
101101
else
102102
let extraArguments = VimuxOption('VimuxOpenExtraArgs')
@@ -329,7 +329,8 @@ endfunction
329329

330330
function! s:hasRunner(index) abort
331331
let runnerType = VimuxOption('VimuxRunnerType')
332-
return match(VimuxTmux('list-'.runnerType."s -F '#{".runnerType."_id}'"), a:index)
332+
let allPanes = runnerType ==# 'pane' ? '-a ' : ''
333+
return match(VimuxTmux('list-'.runnerType."s ".allPanes."-F '#{".runnerType."_id}'"), a:index)
333334
endfunction
334335

335336
function! s:autoclose() abort

0 commit comments

Comments
 (0)