Closed benlubas closed 9 months ago
Yeah, it was intentional, the API looked weird as it wouldn't return the images with .get_images({ buffer = x })
if they were attached to a window, but the window was not passed to get_images
.
When doing the extmark sync I needed to get all the images attached to a buffer regardless of window.
Changing it now to this:
This broke rendering images in floating windows. Causes it to get stuck in a render loop, causing flickering.
I don't really see a reason the logic should have to change. I think it was an attempt to simplify the logic, but evidently it also changed the meaning. If the change on meaning was intentional, do you remember why?
I don't have a video rn bc I'm on the train writing this from my phone, I can add one in a few hours.
Problem is at lua/image/init.lua:378
Keeping the line that was there before and adding
or (opts and opts.buffer and opts.buffer == current_image.buffer and not opts.window)
to the condition fixed the problem for me. And seems to not have broken anything else.