Add auto-width option.
This commit is contained in:
parent
ad67a3fcc6
commit
c83520ef46
|
@ -155,6 +155,9 @@ if !exists('loaded_taglist')
|
||||||
" Vertically split taglist window width setting
|
" Vertically split taglist window width setting
|
||||||
if !exists('Tlist_WinWidth')
|
if !exists('Tlist_WinWidth')
|
||||||
let Tlist_WinWidth = 30
|
let Tlist_WinWidth = 30
|
||||||
|
elseif Tlist_WinWidth == 'auto'
|
||||||
|
let Tlist_WinWidth = 30
|
||||||
|
let s:auto_width = 1
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" Horizontally split taglist window height setting
|
" Horizontally split taglist window height setting
|
||||||
|
@ -1776,6 +1779,10 @@ function! s:Tlist_Window_Refresh()
|
||||||
silent! %foldclose
|
silent! %foldclose
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if !g:Tlist_Use_Horiz_Window && s:auto_width
|
||||||
|
exe 'vertical resize '.g:Tlist_WinWidth
|
||||||
|
endif
|
||||||
|
|
||||||
" Move the cursor to the top of the taglist window
|
" Move the cursor to the top of the taglist window
|
||||||
normal! gg
|
normal! gg
|
||||||
endfunction
|
endfunction
|
||||||
|
@ -2204,6 +2211,11 @@ function! s:Tlist_Parse_Tagline(tag_line,ftype)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if !g:Tlist_Use_Horiz_Window && s:auto_width
|
||||||
|
" Add 3 for the fold columns
|
||||||
|
let g:Tlist_WinWidth = max([g:Tlist_WinWidth, strlen(ttxt)+3])
|
||||||
|
endif
|
||||||
|
|
||||||
" Add this tag to the tag type variable
|
" Add this tag to the tag type variable
|
||||||
let {fidx_ttype} = {fidx_ttype} . ttxt . "\n"
|
let {fidx_ttype} = {fidx_ttype} . ttxt . "\n"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue