Using Vim 70g, I am seeing a weird problem with CursorMoved autocommand. In a function, I am removing my CursorMoved autocommand, moving the cursor and adding the CursorMoved autocommand back, but the cursor movement somehow ends up triggering the autocommand. At the time of cursor movement, there is no way the autocommand could have been defined, but instead of using the state at the time of cursor movement, the state at the end of the execution of the function is being used. Here is some sample code that shows the problem.
cmap <F12> <End><C-U><BS>:<C-R>=TT()<CR><BS> function! TT() aug TT au! aug END try normal j return "" finally aug TT au! au CursorMoved * :call input('CursorMoved') aug END endtry endfunction When I press <F12> on the command-line (make sure you have scope for cursor to move down), I don't expect the autocommand to be triggered, but it does. -- Thanks, Hari __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com