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

Unexpected trailing newline behavior with Cursor and Selection #132

Open
xorgy opened this issue Oct 10, 2024 · 2 comments
Open

Unexpected trailing newline behavior with Cursor and Selection #132

xorgy opened this issue Oct 10, 2024 · 2 comments
Labels
bug Something isn't working
Milestone

Comments

@xorgy
Copy link
Member

xorgy commented Oct 10, 2024

No description provided.

@xorgy xorgy added this to the 0.3 Release milestone Oct 10, 2024
@xorgy xorgy added the bug Something isn't working label Oct 10, 2024
@xorgy xorgy changed the title Correct trailing newline behavior with Cursor and Selection Unexpected trailing newline behavior with Cursor and Selection Oct 10, 2024
@dfrg
Copy link
Collaborator

dfrg commented Oct 13, 2024

This is a bug that originates in swash. Essentially, the Unicode line breaking algorithm generates mandatory breaks after the newline sequence so we don’t capture the final empty line at all because we don’t have a cluster where we can attach the state. I have a “fix” for this in the upcoming code that just uses the cluster’s whitespace property to detect newlines and ignores the results of the LBA entirely for these. This actually simplifies the code a bit and removes the nasty “skip mandatory break” logic.

@mwcampbell
Copy link
Contributor

What's the status of this bug? Will resolving this require any significant changes to Cursor?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants