Support block delete with word and line modifiers#79973
Merged
justinmc merged 19 commits intoflutter:masterfrom Apr 7, 2021
Merged
Support block delete with word and line modifiers#79973justinmc merged 19 commits intoflutter:masterfrom
justinmc merged 19 commits intoflutter:masterfrom
Conversation
Contributor
Author
|
Here is the commit that fixes the last merge attempt of this fix: 9b6c443 Sorry for the inconvenient. |
justinmc
approved these changes
Apr 7, 2021
Contributor
There was a problem hiding this comment.
LGTM 👍
I'll try to remember to keep an eye out for any new tests being added to editable_test.dart. I'll also try to be quick about merging this so that there is a low chance of more problems.
For the record, the test that caused the previous PR to fail was added in #79877.
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.
This PR focuses on supporting modifiers to delete blocks of text in a editable widget.
Shortcuts per OS
Some cases for reference:
case: 'text with| multiple words'
word modifier + backspace: 'text | multiple words'
line modifier + backspace: '| multiple words'
word modifier + delete: 'text with| words'
line modifier + delete: 'text with|'
case: 'text with multiple\n|words'
word modifier + backspace: 'text with |words'
line modifier + backspace: 'text with multiple\n|words'
word modifier + delete: 'text with multiple\n|'
line modifier + delete: 'text with multiple\n|'
case: 'text with multiple|\nwords'
word modifier + backspace: 'text with |\nwords'
line modifier + backspace: '|\nwords'
word modifier + delete: 'text with multiple|'
line modifier + delete: 'text with multiple|\nwords'
case: 'text with\n|\nmultiple words' in obscure text
word modifier + backspace: '|\nmultiple words'
line modifier + backspace: '|\nmultiple words'
word modifier + delete: 'text with\n|'
line modifier + delete: 'text with\n|'
case: 用多個塊測試 (cursor at offset 4)
backspace: '用多個測試' (cursor at offset 3)
word modifier + backspace: '用多個測試' (cursor at offset 3)
line modifier + backspace: '測試' (cursor at offset 0)
word modifier + delete: '用多個塊試' (cursor at offset 4)
line modifier + delete: '用多個塊' (cursor at offset 4)
case: برنامج أهلا بالعالم (cursor at offset 4 - from the right)
backspace: برنمج أهلا بالعالم (cursor at offset 3 - from the right)
word modifier + backspace: مج أهلا بالعالم (cursor at offset 0 - from the right)
word modifier + delete: برنا أهلا بالعالم (cursor at offset 4 - from the right)
Related issue:
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.