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

When &wrap is set image location is miscalculated #62

Closed
Bekaboo opened this issue Oct 24, 2023 · 1 comment
Closed

When &wrap is set image location is miscalculated #62

Bekaboo opened this issue Oct 24, 2023 · 1 comment

Comments

@Bekaboo
Copy link

Bekaboo commented Oct 24, 2023

Firstly, thanks for you effort on this amazing plugin!

A small bug I found when playing with it is that when &wrap is set and there is a wrapped long line before the image, the image position will be miscalculated, here are some screenshots:

No wrap:

image

After :set wrap:

image

Could we take &wrap into consideration when calculating the image position? In addition, some options, such as &soothscroll, &breakindent, &breakindentpot, &linebreak can affect the visual height of a single logic line.

@3rd
Copy link
Owner

3rd commented Oct 24, 2023

Hey, thank you for the kind words!
I did try to make it work with wrap & co, but didn't get far.
There are many options that have an impact on how many lines a "line" spans vertically.
Wouldn't do it unless we get some kind of API for measuring that, or find some magic way to do it consistently.
It also has to be very performant, as we have to compute and sum the visual height of all the lines in the buffer to pinpoint where to render.
I'd say that for me at least it's out of scope, but would be happy to merge any good solution for it.
I got used to textwidth and using gw just to avoid wrap issues, many things are not compatible with &wrap.

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

No branches or pull requests

2 participants