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

Fix off-by-one error in PlainEditor::cursor_at #187

Merged
merged 1 commit into from
Nov 28, 2024

Conversation

tomcur
Copy link
Member

@tomcur tomcur commented Nov 28, 2024

I believe the cursor should still land at index self.buffer.len() (logically following the last cluster).

E.g., in linebender/xilem#762, if used without this change, the selection can't span the last cluster using cursor_at.

I believe the cursor should still land at index `self.buffer.len()`
(logically following the last cluster).

E.g., in linebender/xilem#762, if used without this
change, the selection can't span the last cluster using `cursor_at`.
Copy link
Member

@DJMcNab DJMcNab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed that this makes sense

@tomcur tomcur added this pull request to the merge queue Nov 28, 2024
Merged via the queue into linebender:main with commit ef2caca Nov 28, 2024
20 checks passed
@tomcur tomcur deleted the cursor-at branch November 28, 2024 16:13
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.

2 participants