Skip to content

Fix crash in method setComposingRegion - #3112

Merged
Andrei Salavei (ASalavei) merged 1 commit into
jb-mainfrom
andrei.salavei/crash-in-method-setComposingRegion
Jun 12, 2026
Merged

Fix crash in method setComposingRegion#3112
Andrei Salavei (ASalavei) merged 1 commit into
jb-mainfrom
andrei.salavei/crash-in-method-setComposingRegion

Conversation

@ASalavei

Copy link
Copy Markdown

Align implementation with the SetComposingRegionCommand.

Fixes https://youtrack.jetbrains.com/issue/CMP-10281

Release Notes

Fixes - Multiple Platforms

  • Fix crash in method setComposingRegion when calling it with inverted or invalid region

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that we also have a wrinkle in TextEditingScope.setSelection: SetSelectionCommand makes sure start < end, but TextEditingScope.setSelection does not.

I think it's ok though because it's valid for selection to be reversed.

@ASalavei
Andrei Salavei (ASalavei) merged commit 7bd466e into jb-main Jun 12, 2026
18 of 19 checks passed
@ASalavei
Andrei Salavei (ASalavei) deleted the andrei.salavei/crash-in-method-setComposingRegion branch June 12, 2026 12:01
Apolo (ApoloApps) pushed a commit to ApoloApps/compose-multiplatform-core that referenced this pull request Jul 20, 2026
Align implementation with the `SetComposingRegionCommand`.

Fixes https://youtrack.jetbrains.com/issue/CMP-10281

## Release Notes
### Fixes - Multiple Platforms
- Fix crash in method setComposingRegion when calling it with inverted
or invalid region
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants