1
0
forked from aniani/vim

patch 7.4.1300

Problem:    Cannot test CursorMovedI because there is typeahead.
Solution:   Add disable_char_avail_for_testing().
This commit is contained in:
Bram Moolenaar
2016-02-10 22:23:06 +01:00
parent f6157284de
commit 2ab375e54e
6 changed files with 50 additions and 4 deletions

View File

@@ -1888,6 +1888,12 @@ char_avail(void)
{
int retval;
#ifdef FEAT_EVAL
/* When disable_char_avail_for_testing(1) was called pretend there is no
* typeahead. */
if (disable_char_avail_for_testing)
return FALSE;
#endif
++no_mapping;
retval = vpeekc();
--no_mapping;