Skip to content

Commit 679d484

Browse files
committed
fix: defer closing guest to make rpcrequest work
1 parent e420e53 commit 679d484

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lua/flatten/core.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ local M = {}
22

33
function M.unblock_guest(guest_pipe)
44
local response_sock = vim.fn.sockconnect("pipe", guest_pipe, { rpc = true })
5-
vim.rpcnotify(
5+
vim.rpcrequest(
66
response_sock,
77
"nvim_exec_lua",
8-
---@diagnostic disable-next-line: param-type-mismatch
9-
"vim.cmd.qa({ bang = true })",
8+
"vim.defer_fn(function() vim.cmd.qa({ bang = true }) end, 25)",
9+
---@diagnostic disable-next-line: redundant-parameter
1010
{}
1111
)
1212
vim.fn.chanclose(response_sock)

0 commit comments

Comments
 (0)