aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua
diff options
context:
space:
mode:
authorbfredl <bjorn.linse@gmail.com>2022-09-22 11:09:33 +0200
committerGitHub <noreply@github.com>2022-09-22 11:09:33 +0200
commit7fc5f6605fb3de361c970a1d22a42a905a072a0c (patch)
treeffe2148ab3193f2c122ed43e9655e3179b17c1e5 /runtime/lua
parent8d13b08a03c31cdb269b7d09c166e0b447f2a303 (diff)
parent02f8ca59a80cd3570593c717ff6ceadc33239b89 (diff)
downloadrneovim-7fc5f6605fb3de361c970a1d22a42a905a072a0c.tar.gz
rneovim-7fc5f6605fb3de361c970a1d22a42a905a072a0c.tar.bz2
rneovim-7fc5f6605fb3de361c970a1d22a42a905a072a0c.zip
Merge pull request #20249 from bfredl/cmdmessage
fix(redraw): avoid unnecessary redraws and glitches with floats+messages
Diffstat (limited to 'runtime/lua')
-rw-r--r--runtime/lua/man.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/runtime/lua/man.lua b/runtime/lua/man.lua
index f0306f4871..88535321ac 100644
--- a/runtime/lua/man.lua
+++ b/runtime/lua/man.lua
@@ -21,13 +21,15 @@ local function man_system(cmd, silent)
local done = false
local exit_code
- local handle = vim.loop.spawn(cmd[1], {
+ local handle
+ handle = vim.loop.spawn(cmd[1], {
args = vim.list_slice(cmd, 2),
stdio = { nil, stdout, stderr },
}, function(code)
exit_code = code
stdout:close()
stderr:close()
+ handle:close()
done = true
end)
@@ -52,7 +54,7 @@ local function man_system(cmd, silent)
if not done then
if handle then
- vim.loop.shutdown(handle)
+ handle:close()
stdout:close()
stderr:close()
end