Skip to content

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions plugin/vimux.vim
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ endfunction

function! VimuxOpenRunner() abort
let existingId = s:existingRunnerId()
if existingId !=# ''
if !exists('g:VimuxRunnerIndex') && existingId !=# ''
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about calling s:hasRunner()?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah sorry I'm thinking of the version I've got sitting in #237. I'll take a closer look at this.

let g:VimuxRunnerIndex = existingId
else
let extraArguments = VimuxOption('VimuxOpenExtraArgs')
Expand Down Expand Up @@ -329,7 +329,8 @@ endfunction

function! s:hasRunner(index) abort
let runnerType = VimuxOption('VimuxRunnerType')
return match(VimuxTmux('list-'.runnerType."s -F '#{".runnerType."_id}'"), a:index)
let allPanes = runnerType ==# 'pane' ? '-a ' : ''
return match(VimuxTmux('list-'.runnerType."s ".allPanes."-F '#{".runnerType."_id}'"), a:index)
Comment on lines -332 to +333
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tmux list-windows supports -a as well, is there a reason why we shouldn't use it for window runners?

endfunction

function! s:autoclose() abort
Expand Down