Open CorvusYe opened 1 year ago
@CorvusYe thanks for the report.
Can you please:
flutter create flutter_code_editor_126
cd flutter_code_editor_126
flutter pub add flutter_code_editor
flutter pub get
flutter run -d windows
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
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.
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.
I I encountered the same issue
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
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