flutter-code-editor icon indicating copy to clipboard operation
flutter-code-editor copied to clipboard

[Windows10 Desktop] IME doesn't work well

Open CorvusYe opened this issue 2 years ago • 6 comments

IME: Microsoft [MSPY]. flutter_code_editor verson: 0.1.13

When type something in IME Chinese mode, unexpectation happened https://user-images.githubusercontent.com/15630211/207526300-570bb3f2-cc78-4870-aa30-a3ab43d7011f.mp4

CorvusYe avatar Dec 14 '22 06:12 CorvusYe

@CorvusYe thanks for the report.

Can you please:

  1. Verify this with the most recent version which is currently 0.2.1.
  2. Provide the minimal reproducible example.
  3. Give the exact steps like "click after ... symbol, type ..., press ..."

alexeyinkin avatar Dec 14 '22 11:12 alexeyinkin

  • I created a new project via below commands.
flutter create flutter_code_editor_126
cd flutter_code_editor_126
flutter pub add flutter_code_editor
flutter pub get
flutter run -d windows
  • My example yaml
name: flutter_code_editor_126
description: A new Flutter project.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev

version: 1.0.0+1

environment:
  sdk: '>=2.19.0-306.0.dev <3.0.0'

dependencies:
  flutter:
    sdk: flutter
  cupertino_icons: ^1.0.2
  flutter_code_editor: ^0.2.1

dev_dependencies:
  flutter_test:
    sdk: flutter
  flutter_lints: ^2.0.0
  uses-material-design: true
  • Then copy the Basic Usage into main.dart from https://pub.flutter-io.cn/packages/flutter_code_editor
  • steps:
    1. Type "test" in English mode is no problem.
    2. Switch the IME mode to Chinese
    3. Type "Ver ...", reproducible.

https://user-images.githubusercontent.com/15630211/207621156-42f7b841-c2b9-458e-9015-f18b84187f6a.mp4

CorvusYe avatar Dec 14 '22 14:12 CorvusYe

I am not sure whether it is the upstream issue or current repo. I will push the example to https://github.com/CorvusYe/issues_demo.git when my network is well.

Thanks for your reply.

CorvusYe avatar Dec 14 '22 14:12 CorvusYe

Thanks for the report and the example. We currently have other priorities preparing this editor for a use in a large project. We may work on this later.

alexeyinkin avatar Dec 21 '22 04:12 alexeyinkin

I I encountered the same issue

hsduren avatar Apr 29 '24 07:04 hsduren

It will have problems when non English users use the Windows like input method, because the Windows like input method first inputs user text and then replaces the original text. Obviously, the state management component of this library did not consider this during code design, resulting in the state manager adding data before user input to the history stack and treating the text in the replacement operation as new input text when the system is ready to replace it. To solve this, I think it is necessary to check the text state management component

T2XX avatar May 12 '24 15:05 T2XX