Skip to content

Commit

Permalink
Merge pull request #158 from SigmaRichards/master
Browse files Browse the repository at this point in the history
fix: corruption in large images when using ssh
  • Loading branch information
3rd committed Apr 30, 2024
2 parents 18a8617 + 3b72f18 commit 604692f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lua/image/backends/kitty/helpers.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
local codes = require("image/backends/kitty/codes")
local utils = require("image/utils")

local uv = vim.uv
-- Allow for loop to be used on older versions
if not uv then uv = vim.loop end

local stdout = vim.loop.new_tty(1, false)
if not stdout then error("failed to open stdout") end

Expand Down Expand Up @@ -45,7 +49,7 @@ local move_cursor = function(x, y, save)
end
if save then write("\x1b[s") end
write("\x1b[" .. y .. ";" .. x .. "H")
vim.loop.sleep(1)
uv.sleep(1)
end

local restore_cursor = function()
Expand Down Expand Up @@ -92,6 +96,7 @@ local write_graphics = function(config, data)
else
control_payload = "m=1"
end
uv.sleep(1)
end
else
-- utils.debug("kitty control payload:", control_payload)
Expand Down

0 comments on commit 604692f

Please sign in to comment.