> > Use a separate variable for deciding whether or not to trigger
> > TextChangedI autocommand or not. Else we may skip an existing
> > TextChanged autocommand, just because TextChangedI triggered right
> > before.
> > 
> > fixes #8932
> > 
> > Note the test: For some reason, evaluating the g:autocmd_n variable was
> > never performed, therefore currently disabled. I tried different variations
> > of `feedkeys()` with different flags and `:norm!` commands. I could
> > never make it trigger when run automatically... 
> > 
> > Not sure why, it works when running the test interactively, so
> > probably something with type-ahead?
> 
> It needs to go through the main loop, which is where TextChange is
> triggered.  But when sourcing a script it doesn't get there.  There is
> one trick using a :global command:
>       :g/pat/visual<NL>cmd
> 
> Where "cmd" is a Normal mode command.  It then main_loop() to execute
> it.  Let's see if I can make this work.

Well, it works when run separately, but I can't make it work in a test.
That makes it hard to debug.

I think the only way is to run Vim in a terminal window and send it keys
from the test.  Like what is done in Test_Changed_FirstTime()
Can you look into that Christian?

-- 
hundred-and-one symptoms of being an internet addict:
168. You have your own domain name.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20211016105433.B7AE7C80054%40moolenaar.net.

Raspunde prin e-mail lui