From b610fb2f5da3ebb4506a11d2ac914b604a065764 Mon Sep 17 00:00:00 2001 From: Jan Larres Date: Tue, 21 Jan 2014 15:59:11 +1300 Subject: [PATCH] Restore previous window, closes #190 --- autoload/tagbar.vim | 2 ++ 1 file changed, 2 insertions(+) diff --git a/autoload/tagbar.vim b/autoload/tagbar.vim index f751d60..9cb7b2d 100644 --- a/autoload/tagbar.vim +++ b/autoload/tagbar.vim @@ -3740,6 +3740,7 @@ function! s:QuitIfOnlyWindow() abort endif let curwinnr = winnr() + let prevwinnr = winnr('#') call s:goto_win(tagbarwinnr, 1) " Check if there is more than one window @@ -3759,6 +3760,7 @@ function! s:QuitIfOnlyWindow() abort endif endif + call s:goto_win(prevwinnr, 1) call s:goto_win(curwinnr, 1) endfunction