On 1 March 2010 14:54, Ben Fritz <[email protected]> wrote:

 > On Feb 26, 1:41 am, winterTTr <[email protected]> wrote:
 > >
 > > the Code like below( just an example, not the real code ):
 > > I am trying to use the "set eventignore+=BufEnter" and "set
 > > eventignore-=BufEnter" to prevent the
 > > process from running recursively.
 > >
 > > --------------------------begin-----------------------------------
 > > function! TestFunc()
 > >     set eventignore+=BufEnter
 > >
 > >     let bufname = bufname("%")
 > >     " move to specific window
 > >     2wincmd w
 > >     " update buffer
 > >     call append( 0 , bufname )
 > >     " move back
 > >     1wincmd w
 > >
 > >     set eventignore-=BufEnter
 > > endfunction
 > >
 > > autocmd BufEnter * call TestFunc()
 > > --------------------------end--------------------------------------
 > >
 > > Everything is OK until i do the bufdo command. such as "bufdo s/^/1/"
 > > "E474: Invalid argument: eventignore+=BufEnter" message is shown.
 > >
 > >
 >
 > I can reproduce on the "Cream" build for Windows, even
 > after commenting out the entire contents of the TestFunc
 > function, leaving in the :set commands. The "bufdo"
 > command I used was 'bufdo echo
 > expand("%")'.

Me too. It looks to me like 'ei' is being set to ",Syntax"
which is causing do_set() to fail. Maybe event_name2nr()
could do with a "if (*start == ',') ++start;" at the
beginning. Sorry, I don't have a debug version nor can
I compile to test this out, so I'm afraid this is a bit of
a guess. --Antony

-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Raspunde prin e-mail lui