From 806d6228cc8d0eb3334e33669c0f4d5f41ab14bc Mon Sep 17 00:00:00 2001 From: David Nguyen Date: Sat, 27 Jun 2015 14:03:03 +0200 Subject: [PATCH] Close shell buffer when killing the debugger --- autoload/vebugger.vim | 1 + autoload/vebugger/std.vim | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/autoload/vebugger.vim b/autoload/vebugger.vim index c9d127e..d7b0938 100644 --- a/autoload/vebugger.vim +++ b/autoload/vebugger.vim @@ -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 diff --git a/autoload/vebugger/std.vim b/autoload/vebugger/std.vim index f14973c..e72ad15 100644 --- a/autoload/vebugger/std.vim +++ b/autoload/vebugger/std.vim @@ -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