From 2c2b3fb99eb5c881b7d1b9a3f294b6b36307a1ac Mon Sep 17 00:00:00 2001 From: Jan Larres Date: Sat, 14 Jan 2012 19:35:50 +1300 Subject: [PATCH] Use quitall in QuitIfOnlyWindow() --- autoload/tagbar.vim | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/autoload/tagbar.vim b/autoload/tagbar.vim index 9ca8557..8317631 100644 --- a/autoload/tagbar.vim +++ b/autoload/tagbar.vim @@ -2711,13 +2711,14 @@ endfunction " s:QuitIfOnlyWindow() {{{2 function! s:QuitIfOnlyWindow() - " Before quitting Vim, delete the tagbar buffer so that - " the '0 mark is correctly set to the previous buffer. + " Check if there is more than window if winbufnr(2) == -1 " Check if there is more than one tab page if tabpagenr('$') == 1 + " Before quitting Vim, delete the tagbar buffer so that + " the '0 mark is correctly set to the previous buffer. bdelete - quit + quitall else close endif