Skip to content

Commit

Permalink
fix: restore winscrolled handling
Browse files Browse the repository at this point in the history
  • Loading branch information
3rd committed Jun 29, 2023
1 parent d2a69cd commit 721bc43
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions lua/image/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -156,16 +156,16 @@ api.setup = function(options)
})

-- rerender on scroll/fold
-- vim.api.nvim_create_autocmd("WinScrolled", {
-- group = group,
-- callback = function(au)
-- utils.debug("WinScrolled", au)
-- local images = api.get_images({ window = tonumber(au.file) })
-- for _, current_image in ipairs(images) do
-- current_image.render()
-- end
-- end,
-- })
vim.api.nvim_create_autocmd("WinScrolled", {
group = group,
callback = function(au)
utils.debug("WinScrolled", au)
local images = api.get_images({ window = tonumber(au.file) })
for _, current_image in ipairs(images) do
current_image.render()
end
end,
})
end

---@param path string
Expand Down

0 comments on commit 721bc43

Please sign in to comment.