diff --git a/plugin/surround.vim b/plugin/surround.vim index 34d20aa..82b016e 100644 --- a/plugin/surround.vim +++ b/plugin/surround.vim @@ -212,10 +212,11 @@ function! s:wrap(string,char,type,removed,special) elseif newchar ==# 'l' || newchar == '\' " LaTeX let env = input('\begin{') - let env = '{' . env - let env .= s:closematch(env) - echo '\begin'.env if env != "" + let s:input = env."\" + let env = '{' . env + let env .= s:closematch(env) + echo '\begin'.env let before = '\begin'.env let after = '\end'.matchstr(env,'[^}]*').'}' endif