mirror of
https://github.com/gryf/tagbar.git
synced 2025-12-17 11:30:28 +01:00
Block ProcessFile from processing unloaded or nonexistant buffers (#589)
This commit is contained in:
committed by
Caleb Maclennan
parent
6dafb3dfe8
commit
679a9d9ac9
@@ -1148,6 +1148,17 @@ function! s:ProcessFile(fname, ftype) abort
|
||||
return
|
||||
endif
|
||||
|
||||
let l:bufnum = bufnr(a:fname)
|
||||
|
||||
if !bufloaded(l:bufnum)
|
||||
call tagbar#debug#log('[ProcessFile] Buffer is not loaded exiting...')
|
||||
return
|
||||
endif
|
||||
if !bufexists(l:bufnum)
|
||||
call tagbar#debug#log('[ProcessFile] Buffer does not exist exiting...')
|
||||
return
|
||||
endif
|
||||
|
||||
let typeinfo = s:known_types[a:ftype]
|
||||
|
||||
" If the file has only been updated preserve the fold states, otherwise
|
||||
|
||||
Reference in New Issue
Block a user