1
0
mirror of https://github.com/gryf/tagbar.git synced 2025-12-17 11:30:28 +01:00

Remove open buffer from known files on bdelete or bwipe (#768)

Closes #750

On `:bdelete` or `:bwipe` of a file, remove the file from the known file
listing even if the tagbar window is not open. Previously was only
removing the file if the tagbar window was open.
This commit is contained in:
David Hegland
2021-05-24 09:28:01 -05:00
committed by GitHub
parent fd4bc0f0e4
commit 84afd8e802

View File

@@ -3463,13 +3463,13 @@ function! s:HandleBufDelete(bufname, bufnr) abort
return
endif
call s:known_files.rm(fnamemodify(a:bufname, ':p'))
let tagbarwinnr = bufwinnr(s:TagbarBufName())
if tagbarwinnr == -1 || a:bufname =~# '__Tagbar__.*'
return
endif
call s:known_files.rm(fnamemodify(a:bufname, ':p'))
if !s:HasOpenFileWindows()
if tabpagenr('$') == 1 && exists('t:tagbar_buf_name')
" The last normal window closed due to a :bdelete/:bwipeout.