Repository navigation
Conversation
A click in a Textarea starts a selection with the same anchor and focus. Enter, Backspace, Delete and the word deletes only ended a selection that had a width, so the zero-width one stayed, and the editor view does not follow the cursor while a selection exists. In a one-row Textarea, a click then Enter left the cursor on row 2 with row 1 showing, and later frames did not bring it back. These edits now end any selection, as Core's edits do. A click still keeps its native anchor, so a drag that starts from it is unchanged. Issue: 608
Two breaks of the edit rule passed every test. Deleting natively on the click's empty selection removed a line that holds only a combining mark (U+0301), since native deletes such zero-cell bytes on an empty range. Treating a one-cell selection as empty made Delete remove the character after it. A click then Enter on that line, and Delete on a one-character selection, now check both. Tests are over the line budget (+44 on this branch, target negative): this is the first Rust test that checks the editor view follows the cursor after a mouse gesture, and there was no Textarea mouse table to extend, so it is one new table test. Issue: 608
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A click in a Rust
TextareaorInputstarts a selection with the same anchor and focus. Enter,Backspace, Delete and the word deletes only ended a selection that had a width, so the zero-width one
stayed, and the editor view does not follow the cursor while a selection exists. In a one-row
Textarea, a click then Enter left the cursor on the row below the visible one, and later frames did
not bring it back. OpenCode's Rust prompt is such a Textarea.
These edits now end any selection, as Core's edits do. A click still keeps its native anchor, so a
drag that starts from it extends from the same text as before.
Tested with a table over click, a drag back to the start, and a drag over text, each followed by
each of the five edits, in a one-row Textarea (the text, and that the cursor is inside the view),
plus a line of only a combining mark and a one-character selection.