Open raven42 opened 1 year ago
Not sure if it's a proper/minimal one but the the following patch seems to fix the issue for me. The idea is taken from this link
diff --git a/autoload/tagbar.vim b/autoload/tagbar.vim
index de8b4b3..db90f53 100644
--- a/autoload/tagbar.vim
+++ b/autoload/tagbar.vim
@@ -3540,7 +3540,7 @@ function! s:HandleOnlyWindow() abort
try
try
- quit
+ call timer_start(0, {-> execute('q', 'silent!') })
catch /.*/ " This can be E173 and maybe others
call s:OpenWindow('')
echoerr v:exception
That looks like it could work. If you want to push up a pull request, then if anybody else wants to help test it out as well we could get that in.
In the
s:HandleOnlyWindow()
routine, currently the autoclose is not behaving correctly. With the introduction of vim-9.0 (patch-9.0.907) thequit
while inside an autocmd no longer functions.Have started a fix for this to use the
feedkeys()
, however that doesn't handle each case. It issues the:quit
no matter what even in an E173 (Additional files open), and just blows the windows away regardless. We may have to do away with the autoclose and instead guide users to a more streamlined option like this: