--- In taglist@yahoogroups.com, "jyx_bech" <jyx_bech@...> wrote:
>
> Hi,
>
> I have noticed a problem when using taglist and tabs, which I want to
> report. Try the following
>
>
> 1. Open any file, a.c
> 2. :TlistToggle
> 3. :tabnew b.c
> 4. :TlistToggle
> 5. gt
>
> You get something like this:
> Error detected while processing function <SNR>22_Tlist_Refresh_Folds:
> line 24:
> E16: Invalid range: 4,10fold
>
>
> It seems like this happens when
> 1) You wrap around from the right most tab to the first tab
> and ...
> 2) When you move backwards, i.e by pressing gT
> however the problem isn't really consistent.
I believe this only happen if:
- g:Tlist_Show_One_File is set
- switching from a buffer with more tags (more lines in the taglist
window) than the new displayed buffer
I have fixed it by applying the following patch to the latest version
(4.5):
--- plugin/taglist.vim 2008-08-13 19:04:48 +0000
+++ plugin/taglist.vim 2008-08-27 19:24:49 +0000
@@ -4097,6 +4097,12 @@
" window. Used after entering a tab. If this is not done, then the folds
" are not properly created for taglist windows displayed in multiple
tabs.
function! s:Tlist_Refresh_Folds()
+
+ " Not needed when one file is displayed.
+ if g:Tlist_Show_One_File
+ return
+ endif
+
let winnum = bufwinnr(g:TagList_title)
if winnum == -1
return