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

IME mode isn't automatically escaped when pressing Ctrl + S in Source Code Mode, causing user to save twice. #19

Open
1 task done
TetraTheta opened this issue Sep 26, 2023 · 1 comment
Labels
bug 🪲 Something isn't working help wanted Extra attention is needed

Comments

@TetraTheta
Copy link

Description

If user tries to save file with Ctrl + S in Source Code Mode, IME mode isn't automatically escaped.

Pressing Ctrl + S first time escapes IME mode, but don't save the file. So user must press Ctrl + S again to save file.

  • Can you reproduce the issue?

Steps to reproduce

  1. Make sure that you're using language with IME mode, such as Chinese, Japanese, Korean etc.
  2. Write some texts on Editor Mode
  3. Save document with Ctrl + S on Editor Mode
    It will be saved with automatic IME mode escape
  4. Toggle to Source Code Mode by pressing Ctrl + E
  5. Write some texts on Source Code Mode
    Make sure you don't escape IME mode with Space or Enter or arrow key etc.
  6. Save document with Ctrl + S on Source Code Mode
    First attempt will fail while escaping IME mode
    Second attempt will save file correctly

Expected behavior

When pressing Ctrl + S, IME mode should be escaped and file should be saved too, just like in Editor Mode.

Actual behavior

Only IME mode is escaped when pressing Ctrl + S while at IME mode.

Versions

  • MarkText version: Local build from 01e6922
  • Operating system: Windows 11 22H2

Additional Note

I'm not sure if this is related to marktext#3419 but I really don't know why this problem happens.

This problem won't be easy to reproduce for people not in East Asia because they don't have IME mode in their keyboard/language. You might need to install CJK language pack and switch to corresponding keyboard layout to reproduce.

Instead of posting issue in marktext/marktext, I choose to post it here because this repository is much more active than the origianl.

@jacobwhall jacobwhall added bug 🪲 Something isn't working help wanted Extra attention is needed labels Sep 29, 2023
@jacobwhall
Copy link
Owner

Thank for for the detailed bug report.

This problem won't be easy to reproduce for people not in East Asia because they don't have IME mode in their keyboard/language. You might need to install CJK language pack and switch to corresponding keyboard layout to reproduce.

Yes, unfortunately this will take some time and research on my part. I can't commit to doing so in the near-term. I added the "help wanted" label to this issue, in case someone is able to help fix it.

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

No branches or pull requests

2 participants