Skip to content

Commit

Permalink
fix: chinese IME
Browse files Browse the repository at this point in the history
  • Loading branch information
q200892907 authored Jan 9, 2024
1 parent c8ba248 commit bdc0dc1
Showing 1 changed file with 7 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ Future<void> onNonTextUpdate(
final selection = editorState.selection;

if (PlatformExtension.isWindows) {
if (selection != null &&
nonTextUpdate.composing == TextRange.empty &&
nonTextUpdate.selection.isCollapsed) {
editorState.selection = Selection.collapsed(
Position(
path: selection.start.path,
offset: nonTextUpdate.selection.start,
if (selection != null) {
editorState.updateSelectionWithReason(
Selection.collapsed(
Position(
path: selection.start.path,
offset: nonTextUpdate.selection.start,
),
),
);
}
Expand All @@ -31,9 +31,6 @@ Future<void> onNonTextUpdate(
offset: nonTextUpdate.selection.start,
),
),
extraInfo: {
selectionExtraInfoDoNotAttachTextService: true,
},
);
}
} else if (PlatformExtension.isMacOS) {
Expand Down

0 comments on commit bdc0dc1

Please sign in to comment.