3rd / image.nvim

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

feat: track col position for extmarks #159

Closed benlubas closed 5 months ago

benlubas commented 5 months ago

[^2]: issue in quotes b/c it was intentional, and worked fine for document integrations

Changes a few things. Notably, we render images at the exact extmark position instead of one line lower. This causes some issues with the document integrations or rather, with virtually padded images in general, so now there's a check before rendering that causes images with virtual padding to render one line below their extmark, and this is likely the desired behavior.

tested with document integrations, my experimental latex renderer for neorg, and molten.

Causes an 'issue' with multiple virtually padded images on the same line where they each get their own padding, which looks unexpected. Fixing that issue would likely require a lot of new ugly code. considering that this would be rare, and that it's fixing a worse bug (image positions never updating), I think this behavior is acceptable.

3rd commented 5 months ago

:fire: