comparison src/evalfunc.c @ 14710:b9a4e49a3f7c v8.1.0367

patch 8.1.0367: getchar(1) no longer processes pending messages commit https://github.com/vim/vim/commit/84d9390480548c8d711dd772cb162a91d0bb3c30 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Sep 11 20:10:20 2018 +0200 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().
author Christian Brabandt <cb@256bit.org>
date Tue, 11 Sep 2018 20:15:07 +0200
parents 0a3b9ecf7cb8
children 193471015e1a
comparison
equal deleted inserted replaced
14709:a5265f6bf10c 14710:b9a4e49a3f7c
4678 f_getchar(typval_T *argvars, typval_T *rettv) 4678 f_getchar(typval_T *argvars, typval_T *rettv)
4679 { 4679 {
4680 varnumber_T n; 4680 varnumber_T n;
4681 int error = FALSE; 4681 int error = FALSE;
4682 4682
4683 #ifdef MESSAGE_QUEUE
4684 // vpeekc() used to check for messages, but that caused problems, invoking
4685 // a callback where it was not expected. Some plugins use getchar(1) in a
4686 // loop to await a message, therefore make sure we check for messages here.
4687 parse_queued_messages();
4688 #endif
4689
4683 /* Position the cursor. Needed after a message that ends in a space. */ 4690 /* Position the cursor. Needed after a message that ends in a space. */
4684 windgoto(msg_row, msg_col); 4691 windgoto(msg_row, msg_col);
4685 4692
4686 ++no_mapping; 4693 ++no_mapping;
4687 ++allow_keys; 4694 ++allow_keys;