-
Notifications
You must be signed in to change notification settings - Fork 165
Respect value of g:VimuxRunnerIndex #235
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -101,7 +101,7 @@ function! VimuxOpenRunner() abort | |
return | ||
endif | ||
let existingId = s:existingRunnerId() | ||
if existingId !=# '' | ||
if !exists('g:VimuxRunnerIndex') && existingId !=# '' | ||
let g:VimuxRunnerIndex = existingId | ||
else | ||
let extraArguments = VimuxOption('VimuxOpenExtraArgs') | ||
|
@@ -355,10 +355,8 @@ function! s:hasRunner() abort | |
if get(g:, 'VimuxRunnerIndex', '') ==? '' | ||
return v:false | ||
endif | ||
let l:runnerType = VimuxOption('VimuxRunnerType') | ||
let l:command = 'list-'.runnerType."s -F '#{".runnerType."_id}'" | ||
let l:found = match(VimuxTmux(l:command), g:VimuxRunnerIndex) | ||
return l:found != -1 | ||
let runnerType = VimuxOption('VimuxRunnerType') | ||
return match(VimuxTmux('list-'.runnerType."s -a -F '#{".runnerType."_id}'"), g:VimuxRunnerIndex) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We still need this returning a comparison against -1, as it was before, since I like to avoid doing too much in one line, even if it means more lines of code and more variables- unless a good performance case can be made. Can you please keep the separate lines for defining the command and capturing the match result? |
||
endfunction | ||
|
||
function! s:autoclose() abort | ||
|
Uh oh!
There was an error while loading. Please reload this page.