Skip to content

Commit 66d53ea

Browse files
authored
Respect value of g:VimuxRunnerIndex across all windows and sessions (#235)
1 parent 04f299e commit 66d53ea

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

plugin/vimux.vim

Lines changed: 3 additions & 4 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,9 +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)
358+
let runnerType = VimuxOption('VimuxRunnerType')
359+
let l:found = match(VimuxTmux('list-'.runnerType."s -a -F '#{".runnerType."_id}'"), g:VimuxRunnerIndex)
361360
return l:found != -1
362361
endfunction
363362

0 commit comments

Comments
 (0)