Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] get images api changed in the namespace commit #111

Closed
benlubas opened this issue Jan 3, 2024 · 1 comment
Closed

[bug] get images api changed in the namespace commit #111

benlubas opened this issue Jan 3, 2024 · 1 comment

Comments

@benlubas
Copy link
Contributor

benlubas commented Jan 3, 2024

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.

@3rd
Copy link
Owner

3rd commented Jan 4, 2024

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:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants