diff --git a/doc/taglist.txt b/doc/taglist.txt index c220f02..6a62b39 100644 --- a/doc/taglist.txt +++ b/doc/taglist.txt @@ -2,7 +2,7 @@ Author: Yegappan Lakshmanan (yegappan AT yahoo DOT com) For Vim version 6.0 and above -Last change: 2007 February 18 +Last change: 2007 May 24 1. Overview |taglist-intro| 2. Taglist on the internet |taglist-internet| @@ -1413,6 +1413,13 @@ A. Are you using Vim version 6.0 and above? The taglist plugin relies on the > let Tlist_Ctags_Cmd='C:\Progra~1\Ctags\ctags.exe' < + If you are using a cygwin compiled version of exuberant ctags on MS-Windows, + make sure that either you have the cygwin compiled sort utility installed + and available in your PATH or compile exuberant ctags with internal sort + support. Otherwise, when exuberant ctags sorts the tags output by invoking + the sort utility, it may end up invoking the MS-Windows version of + sort.exe, thereby resulting in failure. + Q. When I try to open the taglist window, I am seeing the following error message. How do I fix this problem? diff --git a/plugin/taglist.vim b/plugin/taglist.vim index eae10dc..94cc1fe 100644 --- a/plugin/taglist.vim +++ b/plugin/taglist.vim @@ -1,8 +1,8 @@ " File: taglist.vim " Author: Yegappan Lakshmanan (yegappan AT yahoo DOT com) -" Version: 4.3 -" Last Modified: February 18, 2007 -" Copyright: Copyright (C) 2002-2006 Yegappan Lakshmanan +" Version: 4.4 +" Last Modified: May 24, 2007 +" Copyright: Copyright (C) 2002-2007 Yegappan Lakshmanan " Permission is hereby granted to use and distribute this code, " with or without modifications, provided that this copyright " notice is copied with it. Like anything else that's free, @@ -1662,7 +1662,7 @@ function! s:Tlist_Window_Init() " Close the fold for this buffer when leaving the buffer if g:Tlist_File_Fold_Auto_Close autocmd BufEnter * silent - \ call s:Tlist_Window_Open_File_Fold(expand('')) + \ call s:Tlist_Window_Open_File_Fold(expand('')) endif " Exit Vim itself if only the taglist window is present (optional) if g:Tlist_Exit_OnlyWindow @@ -4012,8 +4012,8 @@ autocmd BufDelete * silent call s:Tlist_Buffer_Removed(expand(':p')) " Tlist_Window_Open_File_Fold " Open the fold for the specified file and close the fold for all the " other files -function! s:Tlist_Window_Open_File_Fold(acmd_file) - call s:Tlist_Log_Msg('Tlist_Window_Open_File_Fold (' . a:acmd_file . ')') +function! s:Tlist_Window_Open_File_Fold(acmd_bufnr) + call s:Tlist_Log_Msg('Tlist_Window_Open_File_Fold (' . a:acmd_bufnr . ')') " Make sure the taglist window is present let winnum = bufwinnr(g:TagList_title) @@ -4044,7 +4044,7 @@ function! s:Tlist_Window_Open_File_Fold(acmd_file) silent! %foldclose " Get tag list index of the specified file - let fname = fnamemodify(a:acmd_file, ":p") + let fname = fnamemodify(bufname(a:acmd_bufnr + 0), ':p') if filereadable(fname) let fidx = s:Tlist_Get_File_Index(fname) if fidx != -1 @@ -4251,12 +4251,6 @@ function! s:Tlist_Menu_Update_File(clear_menu) endif - let fname = escape(fnamemodify(bufname('%'), ':t'), '.') - if fname != '' - exe 'anoremenu T&ags.' . fname . ' ' - anoremenu T&ags.-SEP2- : - endif - " Skip buffers with 'buftype' set to nofile, nowrite, quickfix or help if &buftype != '' return @@ -4285,6 +4279,12 @@ function! s:Tlist_Menu_Update_File(clear_menu) endif endif + let fname = escape(fnamemodify(bufname('%'), ':t'), '.') + if fname != '' + exe 'anoremenu T&ags.' . fname . ' ' + anoremenu T&ags.-SEP2- : + endif + if !s:tlist_{fidx}_tag_count return endif