Christian Brabandt wrote:
> On Di, 09 Feb 2016, Bram Moolenaar wrote:
>
> > Only noticed this after sending out my fix. We could do both of them.
> >
> > I was trying to write a test for the fix, but autocommands are not
> > triggered when there is typeahead. We probably need some kind of
> > special support for tests to pretend there is no typeahead. Perhaps
> > inserting some special character, e.g. "\<Wait>". Would work a bit like
> > <Nop> but make char_avail() return false.
>
> I rather not mess with getchar.c as long as I am not sure, how to
> correctly test this. I trust you more in this regards.
Looking at vgetorpeek() it's going to be tricky. It returns one byte at
a time and a special key takes three bytes. Checking for a specific
special key would require advancing, but some special keys are handled
in vgetc().
It's simpler to make char_avail() return false.
call disable_char_avail_for_testing(1)
exe "normal ..."
call disable_char_avail_for_testing(0)
Ugly but straightforward.
Oh, I found that your solution to call update_curswant() in getcurpos()
makes Test_move_cursor() fail. Still seems like your change was good,
perhaps the test is wrong? Yes, it's checking the old version of
curswant.
--
'Psychologist' -- Someone who looks at everyone else when
an attractive woman enters the room.
/// 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.