diff options
author | JP <17429390+resolritter@users.noreply.github.com> | 2022-07-18 22:11:13 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-19 09:11:13 +0800 |
commit | 1a655b71a888a2be86ff7d1ff534eac32fc83620 (patch) | |
tree | 417f69cf2721babbf6bc82e28b2a9f6af540c0bd /src | |
parent | a80d447b47c22985a467ce9d2aaf214e966ca642 (diff) | |
download | rneovim-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.c | 6 |
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); |