fix(lua): make it possible to cancel vim.wait() with Ctrl-C (#19217)

This commit is contained in:
JP
2022-07-18 22:11:13 -03:00
committed by GitHub
parent a80d447b47
commit 1a655b71a8
2 changed files with 38 additions and 3 deletions

View File

@@ -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);