diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-02-10 22:23:06 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-02-10 22:23:06 +0100 |
commit | 2ab375e54ef4eac438d1aef8b99d9e71f2fa0c63 (patch) | |
tree | d62682f35f89d4821d4b1a5a8f71c71fb7b9745b /src/getchar.c | |
parent | f6157284de71d8881f3b89fbd79d1ecbf842929f (diff) |
patch 7.4.1300v7.4.1300
Problem: Cannot test CursorMovedI because there is typeahead.
Solution: Add disable_char_avail_for_testing().
Diffstat (limited to 'src/getchar.c')
-rw-r--r-- | src/getchar.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/getchar.c b/src/getchar.c index 2c5709003a..034751492f 100644 --- a/src/getchar.c +++ b/src/getchar.c @@ -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; |