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

Fixes line-rendering for wrapping and scrolling. #1244

Merged
merged 2 commits into from Jan 10, 2024

Conversation

mychris
Copy link
Contributor

@mychris mychris commented Jan 8, 2024

The next attempt to fix line rendering for #1243

The sdl2 front-end requires the whole line to be rendered. Otherwise, the caching of lines won't work. It also doesn't like empty strings.

The left-side-width depends on the front-end. For ncurses, it is the number of characters, for sdl2 the number of pixels.

I also tried to fix the scrolling version with line-numbers. Because the line-numbers are appended before the calculations are done, those will be scrolled out as well.

Hopefully this works now.

@mychris
Copy link
Contributor Author

mychris commented Jan 9, 2024

I added another change which makes use of the window-left-width in the calculations of virtual lines. This makes the navigation of next-line and other functions better, when line-wrapping and line-numbers are enabled.
It is not perfect yet, but seems better than before.

@cxxxr cxxxr merged commit 51c1a1f into lem-project:main Jan 10, 2024
1 check passed
@cxxxr
Copy link
Member

cxxxr commented Jan 10, 2024

Thank you

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 this pull request may close these issues.

None yet

2 participants