Merge pull request #198 from mvanderkamp/responsive_autoclose

Allow resetting the VimuxCloseOnExit option
fix-tmux-next-3dot4
Matthias Bilger 3 years ago committed by GitHub
commit 89604a4464
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -41,12 +41,10 @@ command -bar VimuxClearTerminalScreen :call VimuxClearTerminalScreen()
command -bar VimuxClearRunnerHistory :call VimuxClearRunnerHistory() command -bar VimuxClearRunnerHistory :call VimuxClearRunnerHistory()
command -bar VimuxTogglePane :call VimuxTogglePane() command -bar VimuxTogglePane :call VimuxTogglePane()
if VimuxOption('VimuxCloseOnExit') augroup VimuxAutocmds
augroup VimuxAutocloseCommands au!
au! autocmd VimLeave * call s:autoclose()
autocmd VimLeave * call VimuxCloseRunner() augroup END
augroup END
endif
function! VimuxRunCommandInDir(command, useFile) abort function! VimuxRunCommandInDir(command, useFile) abort
let l:file = '' let l:file = ''
@ -270,3 +268,9 @@ function! s:hasRunner(index) abort
let t = VimuxOption('VimuxRunnerType') let t = VimuxOption('VimuxRunnerType')
return match(VimuxTmux('list-'.t."s -F '#{".t."_id}'"), a:index) return match(VimuxTmux('list-'.t."s -F '#{".t."_id}'"), a:index)
endfunction endfunction
function! s:autoclose() abort
if VimuxOption('VimuxCloseOnExit')
call VimuxCloseRunner()
endif
endfunction

Loading…
Cancel
Save