aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJP <17429390+resolritter@users.noreply.github.com>2022-07-18 22:11:13 -0300
committerGitHub <noreply@github.com>2022-07-19 09:11:13 +0800
commit1a655b71a888a2be86ff7d1ff534eac32fc83620 (patch)
tree417f69cf2721babbf6bc82e28b2a9f6af540c0bd /src
parenta80d447b47c22985a467ce9d2aaf214e966ca642 (diff)
downloadrneovim-1a655b71a888a2be86ff7d1ff534eac32fc83620.tar.gz
rneovim-1a655b71a888a2be86ff7d1ff534eac32fc83620.tar.bz2
rneovim-1a655b71a888a2be86ff7d1ff534eac32fc83620.zip
fix(lua): make it possible to cancel vim.wait() with Ctrl-C (#19217)
Diffstat (limited to 'src')
-rw-r--r--src/nvim/lua/executor.c6
1 files changed, 3 insertions, 3 deletions
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);