Revision: 1002
Author: srinathava
Date: 2006-03-22 20:02:21 -0800 (Wed, 22 Mar 2006)
ViewCVS: http://svn.sourceforge.net/vim-latex/?rev=1002&view=rev
Log Message:
-----------
Bug: Sometimes, template expansion badly screws up (Soren Christensen)
Why: The package detection stuff seems to do strange things during the
expansion of the template. Since I didn't write this part, I do not
really know what exactly might be wrong.
Fix: Make the call to Tex_updateall() _before_ the call to
IMAP_PutTextWithMovement(). This seems to be much better behaved.
Modified Paths:
--------------
trunk/vimfiles/ftplugin/latex-suite/templates.vim
Modified: trunk/vimfiles/ftplugin/latex-suite/templates.vim
===================================================================
--- trunk/vimfiles/ftplugin/latex-suite/templates.vim 2006-03-21 19:28:45 UTC (rev 1001)
+++ trunk/vimfiles/ftplugin/latex-suite/templates.vim 2006-03-23 04:02:21 UTC (rev 1002)
@@ -60,9 +60,11 @@
let s:exeTemp = substitute(getline(1), pattern, '\3', '')
let s:comTemp = substitute(getline(1), pattern, '\4', '')
- call s:ProcessTemplate()
0 d_
+ call s:ProcessTemplate()
+ call Tex_pack_updateall(1)
+
" Do not handle the placeholders here. Let IMAP_PutTextWithMovement do it
" because it handles UTF-8 character substitutions etc. Therefore delete
" the text into @a and paste it using IMAP_PutTextWithMovement().
@@ -84,7 +86,6 @@
call Tex_Debug('phs = '.s:phsTemp.', phe = '.s:pheTemp.', exe = '.s:exeTemp.', com = '.s:comTemp, 'templates')
- call Tex_pack_updateall(1)
endfunction
" }}}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|