mirror of
https://github.com/folke/snacks.nvim
synced 2025-07-09 22:25:11 +00:00
fix(image.terminal): write queued terminal output on main
This commit is contained in:
parent
4c52b7f25d
commit
1b63b1811c
1 changed files with 9 additions and 6 deletions
|
@ -54,12 +54,15 @@ vim.api.nvim_create_autocmd("VimResized", {
|
||||||
-- HACK: ghostty doesn't like it when sending images too fast,
|
-- HACK: ghostty doesn't like it when sending images too fast,
|
||||||
-- after Neovim startup, so we delay the first image
|
-- after Neovim startup, so we delay the first image
|
||||||
local queue = {} ---@type string[]?
|
local queue = {} ---@type string[]?
|
||||||
vim.defer_fn(function()
|
vim.defer_fn(
|
||||||
if queue and #queue > 0 then
|
vim.schedule_wrap(function()
|
||||||
io.stdout:write(table.concat(queue, ""))
|
for _, data in ipairs(queue or {}) do
|
||||||
end
|
io.stdout:write(data)
|
||||||
queue = nil
|
end
|
||||||
end, 100)
|
queue = nil
|
||||||
|
end),
|
||||||
|
100
|
||||||
|
)
|
||||||
|
|
||||||
function M.size()
|
function M.size()
|
||||||
if size then
|
if size then
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue