From 1a655b71a888a2be86ff7d1ff534eac32fc83620 Mon Sep 17 00:00:00 2001 From: JP <17429390+resolritter@users.noreply.github.com> Date: Mon, 18 Jul 2022 22:11:13 -0300 Subject: fix(lua): make it possible to cancel vim.wait() with Ctrl-C (#19217) --- src/nvim/lua/executor.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/nvim/lua/executor.c') diff --git a/src/nvim/lua/executor.c b/src/nvim/lua/executor.c index ad03ebd1ed..fcbf36c711 100644 --- a/src/nvim/lua/executor.c +++ b/src/nvim/lua/executor.c @@ -416,9 +416,9 @@ static int nlua_wait(lua_State *lstate) LOOP_PROCESS_EVENTS_UNTIL(&main_loop, loop_events, (int)timeout, - is_function ? nlua_wait_condition(lstate, - &pcall_status, - &callback_result) : false || got_int); + got_int || (is_function ? nlua_wait_condition(lstate, + &pcall_status, + &callback_result) : false)); // Stop dummy timer time_watcher_stop(tw); -- cgit