image.nvim icon indicating copy to clipboard operation
image.nvim copied to clipboard

Link and preview overlap in markdown integration

Open poly2it opened this issue 1 year ago • 8 comments

Screenshot from 2023-12-29 14-08-41

Using standard configuration with conceal level 2 on Kitty.

poly2it avatar Dec 29 '23 13:12 poly2it

The issue seems to "resolve" itself when I decrease the terminal font size.

poly2it avatar Dec 29 '23 13:12 poly2it

It could be something weird about how Kitty reads those pngs, does it do the same if you convert them to a different format?

3rd avatar Jan 02 '24 15:01 3rd

Having the same issue.

I had a hard time trying to figure out why the minimal setup appeared to work well, yet my own note was rendering weirdly, even after copying and pasting the exact same setup code into my init.lua. This issue made me try reducing the text size, and yes, the image rendered fine once the text was small enough to prevent wrapping. Each soft-wrapped line causes the image to shift one line above where it should be. Since Wezterm doesn't render images properly to begin with, I'm not sure how to get a workable solution with the Kitty protocol on a Mac.

This is what minimal setup gives after editing the text to be a bit longer:

image

Using kitty 0.36.2 on macOS Sonoma 14.6.1

iAurora avatar Sep 24 '24 18:09 iAurora

Hey, what are you using to display the bar on the top? I think that part interacts in a weird way and causes the offset. (if it's not indeed softwrapping)

3rd avatar Sep 24 '24 18:09 3rd

That screenshot displays the result of running nvim --clean -c ":luafile minimal-setup.lua". All I changed in the file I got from this repo is the length of the text. I'm not 100% sure what's happening and why there are 2 windows being opened but this is what my whole terminal window looks like.

If change the text to a shorter one or adjust the font size in terminal so it fits on one line, the problem disappears. If I make the text even longer and it wraps into more lines, the image gets moved up even further.

image

iAurora avatar Sep 24 '24 21:09 iAurora

Same issue is there on my regular config without any bars displayed

image

iAurora avatar Sep 24 '24 21:09 iAurora