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.
Steps to reproduce
- Make sure that you're using language with IME mode, such as Chinese, Japanese, Korean etc.
- Write some texts on Editor Mode
- Save document with Ctrl + S on Editor Mode
It will be saved with automatic IME mode escape
- Toggle to Source Code Mode by pressing Ctrl + E
- Write some texts on Source Code Mode
Make sure you don't escape IME mode with Space or Enter or arrow key etc.
- 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.