From 4317d366691b057ffba4504c1167128a66e4e5c8 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Wed, 5 Feb 2025 06:48:56 +0800 Subject: fix(event-loop): process input before events in getchar() (#32322) Follow-up to #27358. --- src/nvim/getchar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/getchar.c') diff --git a/src/nvim/getchar.c b/src/nvim/getchar.c index 5bf89ee5a8..0817d40bb8 100644 --- a/src/nvim/getchar.c +++ b/src/nvim/getchar.c @@ -1932,7 +1932,7 @@ static void getchar_common(typval_T *argvars, typval_T *rettv, bool allow_number // Flush screen updates before blocking. ui_flush(); input_get(NULL, 0, -1, typebuf.tb_change_cnt, main_loop.events); - if (!multiqueue_empty(main_loop.events)) { + if (!input_available() && !multiqueue_empty(main_loop.events)) { state_handle_k_event(); continue; } -- cgit