diff options
author | Bram Moolenaar <Bram@vim.org> | 2006-04-23 22:40:29 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2006-04-23 22:40:29 +0000 |
commit | 4a85b4156098a30daf5b15a7fb7587a1c7c99f94 (patch) | |
tree | a1874218752c56897f955c24b012836b8c9e80f8 /src/getchar.c | |
parent | eb3593b38b7b6b658e93ad05d6caf76d58cc0c35 (diff) |
updated for version 7.0e07v7.0e07
Diffstat (limited to 'src/getchar.c')
-rw-r--r-- | src/getchar.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/src/getchar.c b/src/getchar.c index 782bdbee01..89df484a26 100644 --- a/src/getchar.c +++ b/src/getchar.c @@ -1034,7 +1034,8 @@ ins_typebuf(str, noremap, offset, nottyped, silent) /* * Return TRUE if the typeahead buffer was changed (while waiting for a - * character to arrive). Happens when a message was received from a client. + * character to arrive). Happens when a message was received from a client or + * from pushkeys(). * But check in a more generic way to avoid trouble: When "typebuf.tb_buf" * changed it was reallocated and the old pointer can no longer be used. * Or "typebuf.tb_off" may have been changed and we would overwrite characters @@ -1045,8 +1046,8 @@ typebuf_changed(tb_change_cnt) int tb_change_cnt; /* old value of typebuf.tb_change_cnt */ { return (tb_change_cnt != 0 && (typebuf.tb_change_cnt != tb_change_cnt -#ifdef FEAT_CLIENTSERVER - || received_from_client +#if defined(FEAT_CLIENTSERVER) || defined(FEAT_EVAL) + || typebuf_was_filled #endif )); } @@ -1142,10 +1143,10 @@ del_typebuf(len, offset) typebuf.tb_no_abbr_cnt -= len; } -#ifdef FEAT_CLIENTSERVER - /* Reset the flag that text received from a client was inserted in the - * typeahead buffer. */ - received_from_client = FALSE; +#if defined(FEAT_CLIENTSERVER) || defined(FEAT_EVAL) + /* Reset the flag that text received from a client or from pushkeys() + * was inserted in the typeahead buffer. */ + typebuf_was_filled = FALSE; #endif if (++typebuf.tb_change_cnt == 0) typebuf.tb_change_cnt = 1; @@ -2917,15 +2918,15 @@ fix_input_buffer(buf, len, script) /* * Return TRUE when bytes are in the input buffer or in the typeahead buffer. * Normally the input buffer would be sufficient, but the server_to_input_buf() - * may insert characters in the typeahead buffer while we are waiting for - * input to arrive. + * or pushkeys() may insert characters in the typeahead buffer while we are + * waiting for input to arrive. */ int input_available() { return (!vim_is_input_buf_empty() -# ifdef FEAT_CLIENTSERVER - || received_from_client +# if defined(FEAT_CLIENTSERVER) || defined(FEAT_EVAL) + || typebuf_was_filled # endif ); } |