<SNIP> >
> Q1) Is using ml_append from (effectively) within RealWaitForChar a bad
> thing?  At the moment it appears to work properly.

Yes.  You never know where in Vim you are, the caller may not handle the
situation that the text changes unexpectedly.  It's similar to
autocommands, which have caused crashes in the past.
At what level in the stack is it safe to call ml_append, etc?  How do
I tell Vim to retreat up to that level, is there code that I can look
at?  At the moment I'm trying to do it by adding to an entry to
keymap.h:key_extra, pushing 3 bytes into buf in os_unix.c (just like
the cursorhold), but I have no idea how to get right out into
main_loop.

Cheers
Brad

Reply via email to