Close shell buffer when killing the debugger

This commit is contained in:
David Nguyen 2015-06-27 14:03:03 +02:00
parent d016e6aec0
commit 806d6228cc
2 changed files with 13 additions and 0 deletions

View File

@ -289,6 +289,7 @@ function! vebugger#killDebugger()
autocmd!
augroup END
if exists('s:debugger')
call vebugger#std#closeShellBuffer(s:debugger)
call s:debugger.closeTerminalBuffer()
call s:debugger.kill()
unlet s:debugger

View File

@ -101,6 +101,18 @@ function! vebugger#std#openShellBuffer(debugger)
wincmd p
endfunction
"Closes the shell buffer
function! vebugger#std#closeShellBuffer(debugger)
if has_key(a:debugger,'shellBuffer')
if -1<bufwinnr(a:debugger.shellBuffer)
let l:bufwin=bufwinnr(a:debugger.shellBuffer)
exe l:bufwin.'wincmd w'
wincmd c
wincmd p
endif
endif
endfunction
let s:standardFunctions={}
"Write a line to the shell buffer