Bug: EEA inserted something different than "eqnarray<F5>".

Why: Tex_EnvMacros() used its own logic for forming the environment string.
Fix: make Tex_EnvMacros() call Tex_PutEnvironment() instead.
This commit is contained in:
Srinath Avadhanula
2003-12-23 21:26:50 +00:00
parent 9a4aecca8c
commit f1cdf65a33
+6 -6
View File
@@ -71,7 +71,8 @@ function! <SID>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."}\<CR>".extra."<++>\<CR>\\end{".a:name."}<++>", 'tex')
" call IMAP (a:lhs, '\begin{'.a:name."}\<CR>".extra."<++>\<CR>\\end{".a:name."}<++>", 'tex')
call IMAP(a:lhs, "\<C-r>=Tex_PutEnvironment('".a:name."')\<CR>", 'tex')
exec 'vnoremap <silent> '.vlhs.' '.vrhs
endif
@@ -416,22 +417,21 @@ function! Tex_eqnarray(env)
if a:env !~ '\*'
let label = input('Label? ')
if label != ''
let arrlabel = '\label{'.label."}\<cr> "
let arrlabel = '\label{'.label."}\<cr>"
else
let arrlabel = ''
endif
else
let arrlabel = ''
endif
return IMAP_PutTextWithMovement('\begin{'.a:env."}\<cr>".arrlabel."<++>\<cr>\\end{".a:env."}<++>")
else
if a:env !~ '\*'
let arrlabel = '\label{<++>}<++>'
let arrlabel = "\\label{<++>}\<cr>"
else
let arrlabel = '<++>'
let arrlabel = ""
endif
return IMAP_PutTextWithMovement('\begin{'.a:env."}\<cr>".arrlabel."\<cr>".'\end{'.a:env.'}<++>')
endif
return IMAP_PutTextWithMovement('\begin{'.a:env."}\<cr><++>\<cr>".arrlabel."\\end{".a:env."}<++>")
endfunction
" }}}
" Tex_list: {{{