mirror of
https://github.com/preservim/tagbar.git
synced 2025-02-13 02:27:14 +08:00
prepare autoclose functionality
This commit is contained in:
parent
db3e802912
commit
5f5e5e1b70
|
@ -49,6 +49,10 @@ if !exists('g:tagbar_types')
|
|||
let g:tagbar_types = {}
|
||||
endif
|
||||
|
||||
if !exists('g:tagbar_autoclose')
|
||||
let g:tagbar_autoclose = 0
|
||||
endif
|
||||
|
||||
function! s:InitTypes()
|
||||
let s:known_files = {}
|
||||
let s:known_types = {}
|
||||
|
@ -190,12 +194,6 @@ function! s:RefreshContent()
|
|||
return
|
||||
endif
|
||||
|
||||
let tagbarwinnr = bufwinnr('__Tagbar__')
|
||||
|
||||
if tagbarwinnr == -1
|
||||
return
|
||||
endif
|
||||
|
||||
if has_key(s:known_files, fname)
|
||||
if s:known_files[fname].mtime != getftime(fname)
|
||||
call s:ProcessFile(fname, &filetype)
|
||||
|
@ -204,7 +202,11 @@ function! s:RefreshContent()
|
|||
call s:ProcessFile(fname, &filetype)
|
||||
endif
|
||||
|
||||
call s:RenderContent(fname, &filetype)
|
||||
let tagbarwinnr = bufwinnr('__Tagbar__')
|
||||
|
||||
if tagbarwinnr != -1
|
||||
call s:RenderContent(fname, &filetype)
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! s:IsValidFile(fname, ftype)
|
||||
|
|
Loading…
Reference in New Issue
Block a user