Skip to content

Commit

Permalink
fix: 'g:tagbar_autoclose_netrw' was not actually really default to 0
Browse files Browse the repository at this point in the history
Signed-off-by: shane.xb.qian <shane.qian@foxmail.com>
  • Loading branch information
Shane-XB-Qian committed Jan 13, 2024
1 parent fcd31ec commit a1dfaf2
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions autoload/tagbar.vim
Original file line number Diff line number Diff line change
Expand Up @@ -3521,13 +3521,15 @@ function! s:HandleOnlyWindow() abort

let file_open = s:HasOpenFileWindows()

if vim_quitting && file_open == 2 && !g:tagbar_autoclose_netrw
call tagbar#debug#log('Closing Tagbar due to QuitPre - netrw only remaining window')
call s:CloseWindow()
if vim_quitting && file_open == 2
if g:tagbar_autoclose_netrw
call tagbar#debug#log('Closing Tagbar due to QuitPre - netrw only remaining window')
call s:CloseWindow()
endif
return
endif

if vim_quitting && file_open != 1
if vim_quitting && file_open == 0
call tagbar#debug#log('Closing Tagbar window due to QuitPre event')
if winnr('$') >= 1
call s:goto_win(tagbarwinnr, 1)
Expand Down

0 comments on commit a1dfaf2

Please sign in to comment.