Better fileinfo removal logging

This commit is contained in:
Jan Larres 2014-04-04 01:08:12 +13:00
parent fabae6a11d
commit a5220adc9a

View File

@ -984,7 +984,8 @@ function! s:CreateAutocommands() abort
" was changed by an external command; see commit 17d199f
autocmd BufReadPost,BufEnter,CursorHold,FileType * call
\ s:AutoUpdate(fnamemodify(expand('<afile>'), ':p'), 0)
autocmd BufDelete,BufWipeout * call s:RemoveFileinfo(expand('<afile>'))
autocmd BufDelete,BufWipeout * call
\ s:known_files.rm(fnamemodify(expand('<afile>'), ':p'))
autocmd QuickFixCmdPre * let s:tagbar_qf_active = 1
autocmd QuickFixCmdPost * if exists('s:tagbar_qf_active') |
@ -1675,6 +1676,7 @@ endfunction
" s:known_files.rm() {{{3
function! s:known_files.rm(fname) abort dict
if s:known_files.has(a:fname)
call s:debug('Removing fileinfo for [' . a:fname . ']')
call remove(self._files, a:fname)
endif
endfunction
@ -3697,13 +3699,6 @@ function! s:IsValidFile(fname, ftype) abort
return 1
endfunction
" s:RemoveFileinfo() {{{2
function! s:RemoveFileinfo(file) abort
let file = fnamemodify(a:file, ':p')
call s:debug('Removing fileinfo for [' . file . ']')
call s:known_files.rm(file)
endfunction
" s:SetStatusLine() {{{2
function! s:SetStatusLine(current)
" Make sure we're actually in the Tagbar window