Fix VimuxTogglePane (#195)

fix-tmux-next-3dot4
John Bredall 3 years ago committed by GitHub
parent ee3075ad30
commit ee0dfae330
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -122,11 +122,13 @@ endfunction
function! VimuxTogglePane()
if exists('g:VimuxRunnerIndex')
if VimuxOption('VimuxRunnerType') ==# 'window'
call VimuxTmux('join-pane -d -s '.g:VimuxRunnerIndex.' -p '.VimuxOption('VimuxHeight'))
let VimuxOption('VimuxRunnerType') = 'pane'
call VimuxTmux('join-pane -s '.g:VimuxRunnerIndex.' -p '.VimuxOption('VimuxHeight'))
let g:VimuxRunnerType = 'pane'
let g:VimuxRunnerIndex = s:tmuxIndex()
call VimuxTmux('last-'.VimuxOption('VimuxRunnerType'))
elseif VimuxOption('VimuxRunnerType') ==# 'pane'
let g:VimuxRunnerIndex=substitute(VimuxTmux('break-pane -d -t '.g:VimuxRunnerIndex." -P -F '#{window_id}'"), '\n', '', '')
let VimuxOption('VimuxRunnerType') = 'window'
let g:VimuxRunnerIndex=substitute(VimuxTmux('break-pane -d -s '.g:VimuxRunnerIndex." -P -F '#{window_id}'"), '\n', '', '')
let g:VimuxRunnerType = 'window'
endif
endif
endfunction

Loading…
Cancel
Save