prepare autoclose functionality

This commit is contained in:
Jan Larres 2011-01-12 23:30:38 +13:00
parent db3e802912
commit 5f5e5e1b70

View File

@ -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)