Yakov Lerner wrote:

> CursorHold is suppsed to be triggered in normal mode
> after &updatetime, correct ? But in the scenario below,
> when vim gets into normal mode after insert mode,
> CursorHold is not triggered:
> 
> 1. vim -u NONE -U NONE
> 2. :let x=0
> 3. :let ut=200            " just some low value
> 3. :au CursorHold * let x=x+1 | echo x
> 4. <C-E><C-E><C-E>  -- watch CursorHold working
> 5. ii<esc>  wait .... there's not CursorHold
>     ii<esc>  wait .... there's not CursorHold
>     ii<esc>  wait .... there's not CursorHold
> 
> Why ? Bug or feature ?

You don't mention the version number.  Does it include patch 7.0.104?
Then this patch should fix it:

*** ../../vim-7.0.118/src/edit.c        Tue Oct  3 15:49:20 2006
--- edit.c      Thu Oct  5 22:26:27 2006
***************
*** 923,928 ****
--- 923,929 ----
                if (cmdchar != 'r' && cmdchar != 'v')
                    apply_autocmds(EVENT_INSERTLEAVE, NULL, NULL,
                                                               FALSE, curbuf);
+               did_cursorhold = FALSE;
  #endif
                return (c == Ctrl_O);
            }

-- 
hundred-and-one symptoms of being an internet addict:
1. You actually wore a blue ribbon to protest the Communications Decency Act.

 /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

Reply via email to