From 31191f912c7a499a41c7bbaf4e9cf094fe4e19a2 Mon Sep 17 00:00:00 2001 From: CatHood0 Date: Sat, 21 Sep 2024 21:52:46 -0400 Subject: [PATCH] revert: Resolved issue with broken IME composing rect in Windows desktop --- .../raw_editor_state_text_input_client_mixin.dart | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/lib/src/editor/raw_editor/raw_editor_state_text_input_client_mixin.dart b/lib/src/editor/raw_editor/raw_editor_state_text_input_client_mixin.dart index 99f99a7b4..5c45bb53e 100644 --- a/lib/src/editor/raw_editor/raw_editor_state_text_input_client_mixin.dart +++ b/lib/src/editor/raw_editor/raw_editor_state_text_input_client_mixin.dart @@ -112,19 +112,9 @@ mixin RawEditorStateTextInputClientMixin on EditorState _textInputConnection!.show(); } - TextRange _getComposingRange() { - if (_lastKnownRemoteTextEditingValue != null && - _lastKnownRemoteTextEditingValue?.composing.isValid == true) { - return _lastKnownRemoteTextEditingValue!.composing; - } else if (textEditingValue.composing.isValid == true) { - return textEditingValue.composing; - } else { - return widget.controller.selection; - } - } - void _updateComposingRectIfNeeded() { - final composingRange = _getComposingRange(); + final composingRange = _lastKnownRemoteTextEditingValue?.composing ?? + textEditingValue.composing; if (hasConnection) { assert(mounted); final offset = composingRange.isValid ? composingRange.start : 0;