bug: Snacks image placement off by one in floating window when using Bufferline.nvim #1557
Open
4 tasks done
Labels
bug
Something isn't working
Did you check docs and existing issues?
Neovim version (nvim -v)
NVIM v0.10.4
Operating system/version
Arch Linux 6.13.5
Describe the bug
I've actually tracked it down to the following code in Snacks.image.placement.render_fallback, I'm just not certain of the correct/best solution:
384 local pos = vim.api.nvim_win_get_position(win)
385 terminal.set_cursor({ pos[1] + 1 + border.top, pos[2] + border.left })
When Bufferline Nvim is enabled, this results in a blank line above the image and the bottom of the image running into the bottom of the floating window frame (i.e. changing it to "pos[1] + 0 + border.top..." corrects the behavior with Bufferline enabled, but then breaks it otherwise).
Steps To Reproduce
I noticed this when running under WezTerm as "placeholders" is false, but can reproduce under kitty by modifying terminal.lua to make it use "render_fallback". Disabling bufferline.nvim also corrects the output, so it's a required factor.
Expected Behavior
Image output should render inside the floating window box regardless of bufferline.nvim being enabled or not.
The text was updated successfully, but these errors were encountered: