diff src/evalfunc.c @ 20213:8d9229c4781a v8.2.0662

patch 8.2.0662: cannot use input() in a channel callback Commit: https://github.com/vim/vim/commit/dfc33a665d3b12689aa971575b8e7de4e5202d83 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Apr 29 22:30:13 2020 +0200 patch 8.2.0662: cannot use input() in a channel callback Problem: Cannot use input() in a channel callback. Solution: Reset vgetc_busy. (closes https://github.com/vim/vim/issues/6010)
author Bram Moolenaar <Bram@vim.org>
date Wed, 29 Apr 2020 22:45:04 +0200
parents 63cc54100ae4
children 42ab4d40e78f
line wrap: on
line diff
--- a/src/evalfunc.c
+++ b/src/evalfunc.c
@@ -2149,7 +2149,7 @@ f_eval(typval_T *argvars, typval_T *rett
     static void
 f_eventhandler(typval_T *argvars UNUSED, typval_T *rettv)
 {
-    rettv->vval.v_number = vgetc_busy;
+    rettv->vval.v_number = vgetc_busy || input_busy;
 }
 
 static garray_T	redir_execute_ga;
@@ -2566,7 +2566,7 @@ f_feedkeys(typval_T *argvars, typval_T *
 #ifdef FEAT_TIMERS
 			|| timer_busy
 #endif
-			)
+			|| input_busy)
 		    typebuf_was_filled = TRUE;
 	    }
 	    vim_free(keys_esc);
@@ -2887,7 +2887,7 @@ f_funcref(typval_T *argvars, typval_T *r
 }
 
     static type_T *
-ret_f_function(int argcount, type_T **argtypes UNUSED)
+ret_f_function(int argcount, type_T **argtypes)
 {
     if (argcount == 1 && argtypes[0]->tt_type == VAR_STRING)
 	return &t_func_any;