From f1cdf65a33fedfe1ebd9dda60f44b176c896bdf2 Mon Sep 17 00:00:00 2001 From: Srinath Avadhanula Date: Tue, 23 Dec 2003 21:26:50 +0000 Subject: [PATCH] Bug: EEA inserted something different than "eqnarray". Why: Tex_EnvMacros() used its own logic for forming the environment string. Fix: make Tex_EnvMacros() call Tex_PutEnvironment() instead. --- ftplugin/latex-suite/envmacros.vim | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ftplugin/latex-suite/envmacros.vim b/ftplugin/latex-suite/envmacros.vim index e5d8d65..26910b1 100755 --- a/ftplugin/latex-suite/envmacros.vim +++ b/ftplugin/latex-suite/envmacros.vim @@ -71,7 +71,8 @@ function! Tex_EnvMacros(lhs, submenu, name) let location = location.a:lhs.'\ ('.vlhs.')' if g:Tex_EnvironmentMaps && !exists('s:doneOnce') - call IMAP (a:lhs, '\begin{'.a:name."}\".extra."<++>\\\end{".a:name."}<++>", 'tex') + " call IMAP (a:lhs, '\begin{'.a:name."}\".extra."<++>\\\end{".a:name."}<++>", 'tex') + call IMAP(a:lhs, "\=Tex_PutEnvironment('".a:name."')\", 'tex') exec 'vnoremap '.vlhs.' '.vrhs endif @@ -416,22 +417,21 @@ function! Tex_eqnarray(env) if a:env !~ '\*' let label = input('Label? ') if label != '' - let arrlabel = '\label{'.label."}\ " + let arrlabel = '\label{'.label."}\" else let arrlabel = '' endif else let arrlabel = '' endif - return IMAP_PutTextWithMovement('\begin{'.a:env."}\".arrlabel."<++>\\\end{".a:env."}<++>") else if a:env !~ '\*' - let arrlabel = '\label{<++>}<++>' + let arrlabel = "\\label{<++>}\" else - let arrlabel = '<++>' + let arrlabel = "" endif - return IMAP_PutTextWithMovement('\begin{'.a:env."}\".arrlabel."\".'\end{'.a:env.'}<++>') endif + return IMAP_PutTextWithMovement('\begin{'.a:env."}\<++>\".arrlabel."\\end{".a:env."}<++>") endfunction " }}} " Tex_list: {{{