vscode icon indicating copy to clipboard operation
vscode copied to clipboard

Undo/Redo adds a stop in between CHN Characters

Open yangjianhua opened this issue 10 years ago • 6 comments

  • VSCode Version: Code 1.3.1 (e6b4afa53e9c0f54edef1673de9001e9f0f547ae, 2016-07-12T13:35:06.227Z)
  • OS Version: Windows_NT ia32 6.3.9600

Steps to Reproduce:

1.Put any Chinese characters (more than 1) in any file of vscode; 2.Press CTRL+Z to undo the action above;

Separate a single CHN character into 2, so we need to press double CTRL+Z in coding.

This is the main reason I still use Sublime Text

yangjianhua avatar Jul 25 '16 03:07 yangjianhua

I cannot reproduce this issue with Google Pinyin on Windows 7 x64 though I am still using VSCode 1.2.1 on this machine. But what I observed is also interesting,

Type "ceshi" and Google Pinyin turns it to "测试". Then Ctrl + Z rolls it back to ceshi.

This behavior exactly matches how Ctrl + Z works inside Chrome.

I don't think this is a bug. It sounds more like a limitation in Chromium IME integration. Note that VSCode is in fact a browser, not a classic desktop app like Sublime Text.

lextm avatar Jul 25 '16 05:07 lextm

In fact it really exists.

I don't know what "Chromium IME integration" mean, I'm using Win 8 as the first post grab.

And it really exists.

it's still the biggest problem that I insist to using Sublime Text

yangjianhua avatar Jul 29 '16 22:07 yangjianhua

The issue can exist if you use a specific Chinese input method (you don't even mention which you are using), as I think Control + Z behavior is heavily tied to the input method itself. I just said that VSCode does nothing wrong, and Chromium based applications (such as Google Chrome) like I tested behave the same.

lextm avatar Jul 30 '16 08:07 lextm

still exists in v1.4, Debian amd64, SCIM+Smart Pinyin.

对一个刚输入简单的中文词语,需要ctrl+z七八次才能完全清除此中文词语。 没装过vsc1.1-1.3,但是v1.0中正常的。感觉vsc创建了太多的undo points.

yaxinlx avatar Aug 07 '16 08:08 yaxinlx

@yangjianhua @yaxinlx Can you please help me out and provide steps for dummies :) -- similar to those described in https://github.com/Microsoft/vscode/wiki/IME-Test

Then, I can try to reproduce and check what happens at the model level that would make undo confused and not stitch together multiple edits in a single undo operation.

alexdima avatar Aug 08 '16 16:08 alexdima

@alexandrudima

Debian packages needed to use smart pinyin: apt-get install scim-pinyin fonts-arphic-ukai fonts-arphic-uming

Restart may be needed to apply the change.

Open vsc1.4, use ctrl+space to toggle input methods.

When Chinese input method is enabled, try inputing "long", pressing space to select a character. Then press crl+z to undo, you need undo 8 times to clear the just input character.

It looks vsc creates two undo points for each letter typing.

yaxinlx avatar Aug 09 '16 02:08 yaxinlx