diff options
author | zeertzjq <zeertzjq@outlook.com> | 2024-02-02 21:52:01 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-02 21:52:01 +0800 |
commit | 9b7cf4f0beb35b640846f92ac522372967ca6695 (patch) | |
tree | f127d978d11c38311880c2acab94b05be8ee00e2 /runtime/lua/vim/_system.lua | |
parent | e98decf9a68e41b09214aa60b77d0db29b7d648a (diff) | |
download | rneovim-9b7cf4f0beb35b640846f92ac522372967ca6695.tar.gz rneovim-9b7cf4f0beb35b640846f92ac522372967ca6695.tar.bz2 rneovim-9b7cf4f0beb35b640846f92ac522372967ca6695.zip |
fix(vim.system): don't process non-fast events during wait() (#27300)
Problem:
Processing non-fast events during SystemObj:wait() may cause two pieces
of code to interfere with each other, and is different from jobwait().
Solution:
Don't process non-fast events during SystemObj:wait().
Diffstat (limited to 'runtime/lua/vim/_system.lua')
-rw-r--r-- | runtime/lua/vim/_system.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/lua/vim/_system.lua b/runtime/lua/vim/_system.lua index efad3f88cf..e97a5fc6c3 100644 --- a/runtime/lua/vim/_system.lua +++ b/runtime/lua/vim/_system.lua @@ -94,14 +94,14 @@ function SystemObj:wait(timeout) local done = vim.wait(timeout or state.timeout or MAX_TIMEOUT, function() return state.result ~= nil - end) + end, nil, true) if not done then -- Send sigkill since this cannot be caught self:_timeout(SIG.KILL) vim.wait(timeout or state.timeout or MAX_TIMEOUT, function() return state.result ~= nil - end) + end, nil, true) end return state.result |