mirror of
https://github.com/preservim/tagbar.git
synced 2025-02-13 23:12:44 +08:00
Only reset '0 mark when it is the last window
We only need to reset '0 mark when our tagbar window is the last one, otherwise, just quit the window and let the other window handle the error that might happen on quiting Vim.
This commit is contained in:
parent
987569e7dd
commit
0224d32eb9
|
@ -3364,7 +3364,11 @@ function! s:QuitIfOnlyWindow() abort
|
|||
if tabpagenr('$') == 1
|
||||
" Before quitting Vim, delete the tagbar buffer so that
|
||||
" the '0 mark is correctly set to the previous buffer.
|
||||
bdelete
|
||||
" Also disable autocmd on this command to avoid unnecessary
|
||||
" autocmd nesting.
|
||||
if winnr('$') == 1
|
||||
noautocmd bdelete
|
||||
endif
|
||||
quit
|
||||
else
|
||||
close
|
||||
|
|
Loading…
Reference in New Issue
Block a user