mirror of
https://github.com/gryf/tagbar.git
synced 2025-12-17 11:30:28 +01:00
Only colse the tagbar window itself
If there are other plugin windows open, close tagbar window and handle over the control to the other window. If the last file in the Vim's file arguments list has not been edited yet, normal Vim's behavior would be quit on ':q!' or twice ':q'. As our plugin window is the last window now, previously quiting on the file window will not trigger the "more files" check, but our window does. We'd better to behave the same. Currently, twice ':q' quiting would work, but ':q!' not. There is no easy way to determine whether the command being executed with a "!" or not, so this is a flaw now and we need to come up a better solution someday, but it is a progress than before.
This commit is contained in:
committed by
Jan Larres
parent
a444c62066
commit
987569e7dd
@@ -3365,7 +3365,7 @@ function! s:QuitIfOnlyWindow() abort
|
||||
" Before quitting Vim, delete the tagbar buffer so that
|
||||
" the '0 mark is correctly set to the previous buffer.
|
||||
bdelete
|
||||
quitall
|
||||
quit
|
||||
else
|
||||
close
|
||||
endif
|
||||
|
||||
Reference in New Issue
Block a user