Fix word deletion behavior with multiple spaces#604
Open
Rigidity wants to merge 1 commit intolinebender:mainfrom
Open
Fix word deletion behavior with multiple spaces#604Rigidity wants to merge 1 commit intolinebender:mainfrom
Rigidity wants to merge 1 commit intolinebender:mainfrom
Conversation
Collaborator
|
Hmm... not sure about changing from logical to visual here. That's going to change the order in which words are deleted for RTL text. |
Author
|
It looks like next_visual_word and previous_visual_word handle whitespace explicitly. So perhaps this logic can just be ported over to the two logical word methods |
Collaborator
|
That seems plausible to me, but I'm not confident in that. |
Member
|
I can confirm that the desired behavior on Windows is also to delete the word and the multiple spaces in one go. I think that fixing |
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.
When using the delete word methods, if there are multiple spaces they are treated as a standalone word. Thus, when backdeleting with the cursor at the end of
word, it deletes the whole thing, but withword, it only deletes the four spaces.I'm not sure of other implications, but I tested this fix locally and it seems to work fine with both single space gaps and multi space gaps, for forward and backward word deletion. It matches the native behavior of MacOS.