1
0
forked from aniani/vim

patch 8.1.0367: getchar(1) no longer processes pending messages

Problem:    getchar(1) no longer processes pending messages. (Yasuhiro
            Matsumoto)
Solution:   Call parse_queued_messages().
This commit is contained in:
Bram Moolenaar
2018-09-11 20:10:20 +02:00
parent 007921611b
commit 84d9390480
2 changed files with 9 additions and 0 deletions

View File

@@ -4680,6 +4680,13 @@ f_getchar(typval_T *argvars, typval_T *rettv)
varnumber_T n;
int error = FALSE;
#ifdef MESSAGE_QUEUE
// vpeekc() used to check for messages, but that caused problems, invoking
// a callback where it was not expected. Some plugins use getchar(1) in a
// loop to await a message, therefore make sure we check for messages here.
parse_queued_messages();
#endif
/* Position the cursor. Needed after a message that ends in a space. */
windgoto(msg_row, msg_col);

View File

@@ -794,6 +794,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
367,
/**/
366,
/**/