3rd / image.nvim

🖼️ Bringing images to Neovim.
MIT License
1.03k stars 42 forks source link

images resize as you scroll #87

Closed constantitus closed 10 months ago

constantitus commented 10 months ago

Most images, especially high resolution ones change size as you scroll, which makes scrolling very janky and sometimes laggy. Can this behaviour changed so that the size never changes ?

https://github.com/3rd/image.nvim/assets/118078873/f555163f-c9d9-49f9-ba20-cd7bc86f0310

(this is kitty)

Bekaboo commented 10 months ago

Also experiencing this issue.

3rd commented 10 months ago

ugh thanks, that's a nasty bug, must be introduced recently. will bisect and revert it tonight!

3rd commented 10 months ago

hey @constantitus, can you please provide the test file & image + your config? i tried to reproduce the image resizing but couldn't with what's now on master

constantitus commented 10 months ago

hey @constantitus, can you please provide the test file & image + your config?

config ```lua package.path = package.path .. ";" .. vim.fn.expand("$HOME") .. "/.luarocks/share/lua/5.1/?/init.lua;" package.path = package.path .. ";" .. vim.fn.expand("$HOME") .. "/.luarocks/share/lua/5.1/?.lua;" require("image").setup({ backend = "kitty", integrations = { markdown = { enabled = true, clear_in_insert_mode = false, download_remote_images = true, only_render_image_at_cursor = false, filetypes = { "markdown", "vimwiki" }, -- markdown extensions (ie. quarto) can go here }, neorg = { enabled = true, clear_in_insert_mode = false, download_remote_images = true, only_render_image_at_cursor = false, filetypes = { "norg" }, }, }, max_width = nil, max_height = nil, max_width_window_percentage = nil, max_height_window_percentage = 50, window_overlap_clear_enabled = false, -- toggles images when windows are overlapped window_overlap_clear_ft_ignore = { "cmp_menu", "cmp_docs", "" }, editor_only_render_when_focused = false, -- auto show/hide images when the editor gains/looses focus tmux_show_only_in_active_window = false, -- auto show/hide images in the correct Tmux window (needs visual-activity off) hijack_file_patterns = { "*.png", "*.jpg", "*.jpeg", "*.gif", "*.webp" }, -- render image files as images when opened }) ```

test.zip

3rd commented 10 months ago

@constantitus thank you, reproduced and pushed a fix, can you confirm if it works for you as well?

constantitus commented 10 months ago

I can confirm it no longer resizes and works fine in kitty, but damn, this one made wezterm work even worse. They really need to fix their kitty icat implementation...

https://github.com/3rd/image.nvim/assets/118078873/45716ef9-02f8-43c9-808f-2e19bd739df4

3rd commented 10 months ago

Ugh that's super buggy, sorry about that. Glad it's ok with Kitty!