Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Entering multiple characters at once moves the text cursor only for one character #186

Closed
grassvalley opened this issue Dec 29, 2020 · 7 comments
Assignees
Labels
bug Something isn't working

Comments

@grassvalley
Copy link

中文输入通常会一次性输入多个字符到文本工具。这个时候,文本光标只向右移动一个字符,而不是移动到这次输入的多个字符的最后面。
非常抱歉,英文水平有限,无法用英文描述这个问题。

@DamirPorobic DamirPorobic changed the title 文本工具对中文输入有问题 Entering multiple Chinese characters at once moves the text cursor only for one character to the right Dec 29, 2020
@DamirPorobic
Copy link
Member

Hello, I can recommend deepl.com, it's excellent for translating larger texts in case you're insecure about your English, that's what I used to get the English version of your text.

For others, the translation:

Chinese input usually involves entering multiple characters into the text tool at once. At this time, the text cursor only moves one character to the right instead of moving to the end of the multiple characters entered this time.
I'm very sorry, but my English is too limited to describe this problem in English.

Thanks for reporting this issue, I'll have a look into it

@DamirPorobic DamirPorobic transferred this issue from ksnip/ksnip Dec 29, 2020
@DamirPorobic DamirPorobic added the bug Something isn't working label Dec 29, 2020
@wangzk
Copy link

wangzk commented Jan 2, 2021

I meet the same bug in Ksnip. When I used the textbox in the annotation tool, I cannot input chinese characters properly. During typing, the cursor in the text box always automatically went back. However, when I copied a piece of text from another location, there was no such problem.
I have attached a video to demonstrate the bug.

STEPS TO REPRODUCE

  1. Take a screen shot.
  2. Open the annotation tool.
  3. Add a text box.
  4. Type "你好" with a Chinese input method in the text box.

OBSERVED RESULT

When I typed "你好[space]",the cursor went back between "你" and "好" as "你|好".

EXPECTED RESULT

The cursor should appear after the character "好" (i.e., "你好|").

simplescreenrecorder-2021-01-02_21.15.09.mp4

@DamirPorobic
Copy link
Member

@wangzk thanks for the video. Yes, I see the issue in the code, one additional question though, can you delete one of those characters on it's own (I mean in other text editors) or are they also deleted as a group?

@DamirPorobic
Copy link
Member

Thinking again about it, might be a stupid question, it's a character, you should be able to delete it.

@wangzk
Copy link

wangzk commented Jan 2, 2021

Thinking again about it, might be a stupid question, it's a character, you should be able to delete it.

Yes, I could delete or move the cursor between Chinese characters one by one.

Thank you for investigating the bug :)

@DamirPorobic DamirPorobic changed the title Entering multiple Chinese characters at once moves the text cursor only for one character to the right Entering multiple characters at once moves the text cursor only for one character Jan 2, 2021
@DamirPorobic
Copy link
Member

This should be fixed now. You can test it with the continuous build version though it might take up to 50 min for the CI to build it.

@DamirPorobic DamirPorobic self-assigned this Jan 2, 2021
@wangzk
Copy link

wangzk commented Jan 3, 2021

I try the nightly build and the bug is fixed. Thank you :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants