Use TextRange.min/max instead of start/end in TextEditingScope#2982
Merged
Alexander Maryanovsky (m-sasha) merged 1 commit intoApr 15, 2026
Merged
Conversation
…ngScope for BTF2, which caused a crash when start > end.
Igor Demin (igordmn)
approved these changes
Apr 15, 2026
Alexander Maryanovsky (m-sasha)
added a commit
that referenced
this pull request
Apr 15, 2026
Vlad Konstantinov (Kpotko)
added a commit
that referenced
this pull request
Apr 21, 2026
Replace usage of TextRange.start/end in favor of min/max in TextEditingScope for BTF2, which caused a crash when start > end. This is a cherry-pick of #2982 ## Testing N/A ## Release Notes ### Fixes - Multiple Platforms - Fixed crash when selecting text right-to-left and then typing a character via IME.
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.
Replace usage of
TextRange.start/endin favor of min/max inTextEditingScopefor BTF2, which caused a crash whenstart > end.Fixes https://youtrack.jetbrains.com/issue/CMP-10082
Testing
Tested manually and added a unit test.
This should be tested by QA
Release Notes
Fixes - Multiple Platforms