From what I can tell after reading docs/web, cursor movement in a script or macro, such as Vader, does not trigger the CursorMoved event. :help CursorMoved actually says something briefly on this:
Not triggered when there is typeahead or when an operator is pending.
So testing effects of a CursorMoved autocmd in Vader seems impossible, but hopefully I'm wrong. I've tried breaking up the moving in separate normal commands, and even tried things like this:
Execute (visual mode forwards):
normal vwjs42
call inputsave()
normal ll
Assert !exists("#SneakPlugin#CursorMoved#<buffer>")
call inputrestore()
normal os55;d
Since inputsave() clears the "typeahead", I was hopeing this would allow the test to trigger CursorMoved. But it doesn't.
You can verify the general problem with these commands:
au CursorMoved * echo 'hi'
normal lh
"hi" is not echoed, though if the user typed lh in normal mode, it would be echoed.
Any ideas? I will ping the vim_use mailing list too.
Thanks!
From what I can tell after reading docs/web, cursor movement in a script or macro, such as Vader, does not trigger the CursorMoved event.
:help CursorMovedactually says something briefly on this:So testing effects of a CursorMoved autocmd in Vader seems impossible, but hopefully I'm wrong. I've tried breaking up the moving in separate
normalcommands, and even tried things like this:Since
inputsave()clears the "typeahead", I was hopeing this would allow the test to triggerCursorMoved. But it doesn't.You can verify the general problem with these commands:
"hi" is not echoed, though if the user typed
lhin normal mode, it would be echoed.Any ideas? I will ping the vim_use mailing list too.
Thanks!