[Vim-latex-cvs] SF.net SVN: vim-latex: [1004] trunk/vimfiles/ftplugin/latex-suite
Brought to you by:
srinathava,
tmaas
From: <sri...@us...> - 2006-03-25 08:40:18
|
Revision: 1004 Author: srinathava Date: 2006-03-25 00:40:15 -0800 (Sat, 25 Mar 2006) ViewCVS: http://svn.sourceforge.net/vim-latex/?rev=1004&view=rev Log Message: ----------- Bug: After applying a filter to the bibtex results, pressing 'a' to get back the full list gives an error (Fabian Braennstroem) Why: Tex_HandleBibShortcuts() did not correctly create the prefix filter when it removed the rest of the filters. Fix: do ze right thing. New: Handle the case when a bibtex file is not found more elegantly. New: Catch a wrong specification of the filter more elegantly. Modified Paths: -------------- trunk/vimfiles/ftplugin/latex-suite/texviewer.vim trunk/vimfiles/ftplugin/latex-suite/version.vim Modified: trunk/vimfiles/ftplugin/latex-suite/texviewer.vim =================================================================== --- trunk/vimfiles/ftplugin/latex-suite/texviewer.vim 2006-03-25 05:41:09 UTC (rev 1003) +++ trunk/vimfiles/ftplugin/latex-suite/texviewer.vim 2006-03-25 08:40:15 UTC (rev 1004) @@ -872,8 +872,13 @@ endif function! Tex_StartCiteCompletion() - let mainfname = Tex_GetMainFileName(':p') let bibfiles = Tex_FindBibFiles() + if bibfiles !~ '\S' + echohl WarningMsg + echomsg 'No bibfiles found! Sorry' + echohl None + return + endif bot split __OUTLINE__ exec Tex_GetVarValue('Tex_OutlineWindowHeight', 15).' wincmd _' @@ -986,6 +991,12 @@ endif let inp = input('Enter '.a:command.' criterion [field<space>value]: ') + if inp !~ '\v^\S+\s+\S.*' + echohl WarningMsg + echomsg 'Invalid filter specification. Use "field<space>value"' + echohl None + return + endif if inp != '' " If the field is specified as a single character, then replace @@ -1005,13 +1016,13 @@ exec "python Tex_BibFile.addsortfield(\"".inp."\")" exec 'python Tex_BibFile.sort()' endif - call Tex_DisplayBibList() + silent! call Tex_DisplayBibList() endif elseif a:command == 'remove_filters' exec 'python Tex_BibFile.rmfilters()' - exec 'python Tex_BibFile.addfilter("key '.s:prefix.'")' + exec 'python Tex_BibFile.addfilter("key ^'.s:prefix.'")' call Tex_DisplayBibList() endif Modified: trunk/vimfiles/ftplugin/latex-suite/version.vim =================================================================== --- trunk/vimfiles/ftplugin/latex-suite/version.vim 2006-03-25 05:41:09 UTC (rev 1003) +++ trunk/vimfiles/ftplugin/latex-suite/version.vim 2006-03-25 08:40:15 UTC (rev 1004) @@ -24,7 +24,7 @@ " "stabilize" that version by releasing a few pre-releases and then " keep that as a stable point. function! Tex_Version() - return "Latex-Suite: version 1.8.12" + return "Latex-Suite: version 1.8.13" endfunction com! -nargs=0 TVersion echo Tex_Version() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |