Update of /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite
In directory sc8-pr-cvs1:/tmp/cvs-serv19595
Modified Files:
packages.vim
Log Message:
- previously created g:Tex_package_detected had a form:
inputencgeometrypolski
Not declared: inputenc,geometry,polski. Fixed.
- Last command in package file (without , at the end) was losing last
letter. Fixed by adding , to commandList
- Don't create separator if command and option lists in package file are
empty. Rare but possible.
Index: packages.vim
===================================================================
RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/packages.vim,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** packages.vim 14 Jan 2003 13:40:39 -0000 1.21
--- packages.vim 14 Jan 2003 22:02:42 -0000 1.22
***************
*** 176,180 ****
" TODO: This will contain duplicates if the user has duplicates.
" Should we bother taking care of this?
! let g:Tex_package_detected = g:Tex_package_detected.@a
" Finally convert @a into something like '"pack1","pack2"'
--- 176,180 ----
" TODO: This will contain duplicates if the user has duplicates.
" Should we bother taking care of this?
! let g:Tex_package_detected = g:Tex_package_detected.','.@a
" Finally convert @a into something like '"pack1","pack2"'
***************
*** 194,197 ****
--- 194,201 ----
endwhile
+ " Because creating list of detected packages gives string
+ " ',pack1,pack2,pack3' remove leading ,
+ let g:Tex_package_detected = substitute(g:Tex_package_detected, '^,', '', '')
+
" Scans whole file (up to \end{document}) for \newcommand and adds this
" commands to g:Tex_PromptedCommands variable, it is easily available
***************
*** 256,261 ****
if exists('g:TeX_package_'.a:pack)
- exec 'amenu '.g:Tex_PackagesMenuLocation.'-sep'.a:pack.'- <Nop>'
let optionList = g:TeX_package_option_{a:pack}.','
if optionList != ''
--- 260,271 ----
if exists('g:TeX_package_'.a:pack)
let optionList = g:TeX_package_option_{a:pack}.','
+ let commandList = g:TeX_package_{a:pack}.','
+
+ " Don't create separator if in package file are only Vim commands.
+ " Rare but possible.
+ if !(commandList == ',' && optionList == ',')
+ exec 'amenu '.g:Tex_PackagesMenuLocation.'-sep'.a:pack.'- <Nop>'
+ endif
if optionList != ''
***************
*** 267,271 ****
endif
- let commandList = g:TeX_package_{a:pack}
if commandList != ''
--- 277,280 ----
|