Re: [Vim-latex-devel] environment bug
Brought to you by:
srinathava,
tmaas
From: Mikolaj M. <mi...@wp...> - 2003-11-11 15:37:26
|
Dnia Tuesday 11 of November 2003 12:27, Artur R. Czechowski napisał: > Hello, > > On Tue, Nov 11, 2003 at 12:58:19PM +0300, Eugene Minkovskii wrote: > > When I'm try to put some text into environment and try to using > > Visual-line mode and press <F5> I'm get following error message: > > > > Error detected while processing function > > Tex_FastEnvironmentInsert..TexDoEnvironment..Tex_PutEnvironment..VEnclo > >se: line 52: > > E121: Undefined variable: Tex_LastSearchPattern > > E15: Invalid expression: Tex_LastSearchPattern > > It looks like a bug submitted do Debian BTS: > http://bugs.debian.org/219484 Eugene, do you use any own-defined > environment? Is it the case? Hello, I couldn't reproduce both bugs (neither Evgenij nor Klaus) but I spotted another one. But in another configuration it can cause similar problems. Here is diff (commit to CVS goes too): --- envmacros.vim.orig 2003-11-11 16:11:11.000000000 +0100 +++ envmacros.vim 2003-11-11 16:10:41.000000000 +0100 @@ -529,7 +529,9 @@ function! Tex_DoEnvironment(...) if a:0 < 1 let env = matchstr(getline('.'), '^\s*\zs\w*\*\=\ze\s*$') - if env == '' + " If in current line is more than one word or in visual mode + " ignore contents of line and prompt for environment + if env == '' || (exists('s:isvisual') && s:isvisual == 'yes') let env = PromptForEnvironment('Choose which environment to insert: ') if env != '' return Tex_PutEnvironment(env) |