Skip to content
New issue

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

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

Already on GitHub? # to your account

Markdown Files Not Rendered Correctly on Horizontal Scroll #23

Closed
dvnatanael opened this issue May 19, 2024 · 3 comments
Closed

Markdown Files Not Rendered Correctly on Horizontal Scroll #23

dvnatanael opened this issue May 19, 2024 · 3 comments

Comments

@dvnatanael
Copy link

dvnatanael commented May 19, 2024

It seems that scrolling horizontally breaks the plugin.

Steps to Reproduce

  1. Open demo/sample.md in nvim
  2. :set nowrap
  3. Go to a line that contains text (e.g. line 9)
  4. Press zL in normal mode

image

edit: wrong image

@MeanderingProgrammer
Copy link
Owner

I'm honestly not too sure if I want to do anything about this, mostly because long lines in Markdown seem incorrect in general.

The solution would be really expensive in that the auto-command would now need to listen to all cursor movements and re-render the marks with any horizontal offset applied.

If that's what the solution ends up being, and I personally cannot think of a way around it, I would rather leave it as a known limitation of this plugin. Especially when another solution is to have the user enable line wrapping on markdown files.

What do you think?

@MeanderingProgrammer
Copy link
Owner

Pushed a change to eventually disable rendering once the user has scrolled horizontally: 966472e

I did not want to add an auto-command on all scroll events, since there are just so many of them, so have left that out for the time being.

If there is a better approach to this definitely let me know!

@dvnatanael
Copy link
Author

Hi, thanks for looking into this. I think that leaving this as a known limitation is perfectly fine, especially since the solution seems to be really expensive.

I'll be sure to let you know if I manage to think of a better approach.

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

No branches or pull requests

2 participants