DrMerfy / vscode-overtype

Because some people actually press the Insert key on purpose.
https://marketplace.visualstudio.com/items?itemName=DrMerfy.overtype
BSD 2-Clause "Simplified" License
38 stars 9 forks source link

Chinese input problem #19

Open DrMerfy opened 3 years ago

DrMerfy commented 3 years ago

Issue Type: Bug

Overtype mode is off Type some Chinese characters (using Microsoft ChangJie for example) The character before the caret will be overtyped / eaten Extension version: 0.2.0 VS Code version: Code 1.52.0 (940b5f4bb5fa47866a54529ed759d95d09ee80be, 2020-12-10T22:45:11.850Z) OS version: Windows_NT x64 10.0.18363

Based on: https://github.com/AdamMaras/vscode-overtype/issues/24

Original issuers/commenters: @avin-shum @NavyD @yoursunny

tetsumetal1964 commented 3 years ago

Same with Japanese Input. It was hard to find out the issue is related to overtype and discussed here. I was stopping use of vscode with Japanese text for a few week. Anyway, thank you for your contribution!

Extension version: 0.2.0 VS Code version: Code 1.56.2

yowynn commented 2 years ago

SAD :(

DrMerfy commented 2 years ago

Tried to play around a bit with overtype and Chinese letters, the behaviour that I'm getting is that:

https://user-images.githubusercontent.com/21154979/126961656-f949ae08-0c25-496a-9ec4-08483cece39a.mov

Could you share a video with the issue to better understand which is the incorrect behaviour?

(on VSCode version: 1.58.0)

avin-shum commented 2 years ago

@DrMerfy Please find my screen capture below:

Expected behaviour: In Overtype mode, the text "一二三四五六七八九十" should becomes "一二朋友五六七八九十". Note: "朋" is formed by codes "月月", and "友" is formed by codes "大水".

Without Overtype Extension:

With Overtype Extension (Overtype mode):

With Overtype Extension (Insert mode)

yowynn commented 2 years ago

Tried to play around a bit with overtype and Chinese letters, the behaviour that I'm getting is that:

Screen.Recording.2021-07-26.at.11.46.21.mov Could you share a video with the issue to better understand which is the incorrect behaviour?

(on VSCode version: 1.58.0)

type a a fullwidth character

https://user-images.githubusercontent.com/17876803/130896600-4c31a424-8da5-4338-9e20-182a9079ab85.mp4

TheV360 commented 2 years ago

I've been having a related problem with Visual Studio Code, where if I open the Windows emoji picker (:window:+;) and select an emoji, it would insert the emoji twice and overwrite surrounding text. I tracked it down to (the unmaintained version of) this extension with an Extension Bisect. I think this is because both the Chinese input system and emoji picker are IMEs?

Here's a video of me triggering the bug:

https://user-images.githubusercontent.com/25177071/136478853-7c6ce5e5-0dad-4b3d-8fbb-3e509253a2e1.mp4

First, I insert an emoji without the extension active, then I try it with the extension active. This is without actually activating the Overtype mode -- it affects the text editor as long as the extension is enabled.

DrMerfy commented 2 years ago

Thanks for the captures, everyone! Sorry that I've taken such a long time to respond. This looks like a very real problem, if I find some time I'll take a closer look into it, but next months are going to be as busy as well.

Just a small reminder, that I still notice what is happening on this extension, I've just not found the time to play around. If someone has any solution, I'd gladly take a look :D

Daniel-Chin commented 2 years ago

Typing a wide-char symbol also eats the previous ascii character when overtype is off.

e.g.
"asdf"
[Type one "。"]
becomes "asd。。"

changlichun commented 2 years ago

@DrMerfy I look into the code and I feel it is because the misbehavier of the default command 'default:type'. It looks like the command 'default:type' behavie different from the direct type. And I occasionally find that this extension works correctly in an elder version of vscode (Version: 1.40.2 (system setup) Commit: f359dd69833dd8800b54d458f6d37ab7c78df520 Date: 2019-11-25T14:54:45.096Z) Video_2022-05-02_165310 I'm sorry that I do not have enough time to look into the vscode's source code, and still no solution. Thank you very much for your patient work.

UniversesAurora commented 2 years ago

Yes it seems to be a bug of vscode. I created a simple extension only overwrite default type command and call default type using executeCommand in it, and this problem still occurred.

Also i found that the problem only occurred on Windows, on macos or linux it seems to work just fine.

FrankSFLYS commented 7 months ago

and 后, becomes ,,