From a5220adc9ae2f8b6cadb9e002019b567713784f6 Mon Sep 17 00:00:00 2001 From: Jan Larres Date: Fri, 4 Apr 2014 01:08:12 +1300 Subject: [PATCH] Better fileinfo removal logging --- autoload/tagbar.vim | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/autoload/tagbar.vim b/autoload/tagbar.vim index a47db7b..e9ec36a 100644 --- a/autoload/tagbar.vim +++ b/autoload/tagbar.vim @@ -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(''), ':p'), 0) - autocmd BufDelete,BufWipeout * call s:RemoveFileinfo(expand('')) + autocmd BufDelete,BufWipeout * call + \ s:known_files.rm(fnamemodify(expand(''), ':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