Fix Hide_Extras bug.

This commit is contained in:
jez 2011-03-18 03:06:13 -04:00
parent f0ab56514e
commit fc9f1c8437

View File

@ -413,9 +413,6 @@ let s:tlist_def_javascript_settings = 'javascript;f:function;v:variable'
if !exists('Tlist_javascript_Ctags_Cmd') && executable('jsctags')
let Tlist_javascript_Ctags_Cmd = 'jsctags'
endif
if !exists('Tlist_javascript_Hide_Extras')
let Tlist_javascript_Hide_Extras = []
endif
let Tlist_javascript_Ctags_Allowed_Flags = ['-f', '--sort']
" lisp language
@ -942,7 +939,7 @@ function! s:Tlist_FileType_Init(ftype)
endwhile
let s:tlist_{a:ftype}_ctags_args = { '--language-force=': ctags_ftype,
\ '--': ctags_ftype, '-types=': ctags_flags }
\ '--'.ctags_ftype.'-types=': ctags_flags }
let s:tlist_{a:ftype}_count = cnt
let s:tlist_{a:ftype}_ctags_flags = ctags_flags
@ -2222,7 +2219,7 @@ function! s:Tlist_Get_Scope_String(tag_line, ftype)
let ttxt = ''
let tag_scopes = s:Tlist_Extract_Tag_Scope(a:tag_line)
for [extradata_name, extradata_content] in items(tag_scopes)
if match(g:Tlist_{a:ftype}_Hide_Extras, extradata_name) == -1
if !exists('g:Tlist_{a:ftype}_Hide_Extras') || match(g:Tlist_{a:ftype}_Hide_Extras, extradata_name) == -1
let ttxt = ttxt . ' [' . extradata_content . ']'
endif
endfor
@ -2845,6 +2842,9 @@ function! s:Tlist_Extract_Tag_Scope(tag_line)
endfunction
function! s:Tlist_Window_Toggle_Extra(ftype, extra_name)
if !exists('g:Tlist_{a:ftype}_Hide_Extras')
return
endif
let index = index(g:Tlist_{a:ftype}_Hide_Extras, a:extra_name)
if index == -1
call add(g:Tlist_{a:ftype}_Hide_Extras, a:extra_name)