mirror of
https://github.com/vim/vim.git
synced 2025-10-14 07:04:10 -04:00
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:
@@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user