Don't reset cursor affinity on newlines #331
Merged
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.
Resolves #298.
This bit of code was apparently here to ensure the cursor moved down a line when you typed a newline, but I've tested it (with both cursor affinities, and around wrapped lines) and didn't observe any change in behavior with it removed.
Since having this code here breaks RTL text navigation, and doesn't seem to do anything else, I think it can be removed now.
There is some weird (probably incorrect) behavior around inserting newlines within an RTL span--as far as I can tell, all of that behavior is pre-existing, and occurs with or without this code present. I'll file a new issue about that.(After testing how browsers behave in this scenario, this appears to just be how it works. Bidirectional text is weird.)