Ben Fritz wrote: > On Wednesday, April 20, 2016 at 9:24:18 AM UTC-5, [email protected] > wrote: > > I've just realised I wrote CursorMovedI when I meant CursorHoldI. Sorry > > about that. > > > > > Would it be sufficient to not trigger CursorMovedI when the user pressed > > > CTRL-X ? What submode would it be in? Or are you saying that this > > > depends on whether the completion uses a popup menu or not? > > > > Yes, I imagine not triggering CursorHoldI when the user presses CTRL-X > > would suffice. > > > > Here's a demonstration of the problem: > > > > 1. Start vim with: > > > > vim -u NONE --cmd 'set updatetime=1000' --cmd 'set showmode' --cmd 'autocmd > > CursorHoldI * 1' > > > > 2. Type "i" to enter insert mode. > > > > 3. Type CTRL-x to enter the insertion completion submode. > > > > 4. Expected: vim stays in insertion completion submode. Actual: after 1 > > second the mode changes back to insert mode. > > > > The motivation for fixing this is when the user has a small updatetime of, > > say, 100ms, they have to be very quick typists to be able to bring up the > > insert completion popup before the CursorHoldI autocommand boots them out > > of insertion completion mode. > > I don't like the idea of not firing CursorHoldI in this mode. Users expect > their CursorHold/CursorHoldI autocmds to fire when they pause for a bit. I've > deliberately stopped typing before to allow this to happen (for example to > update the current highlighted function in tagbar). > > Why would a very short updatetime be useful? It seems like the better > solution is "don't do that", unless there's a good reason for it.
Some things depend on 'updatetime', it could be used to simulate timers (but now we have timer_start()). The CursorHoldI event was already skipped when Insert completion is active, thus if typing something after the CTRL-X, such as CTRL-L, it would also not be triggered. Also when typing CTRL-V. Basically whenever an imcomplete command was typed. -- Have you heard about the new Barbie doll? It's called Divorce Barbie. It comes with all of Ken's stuff. /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org /// -- -- 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 --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
