Vim + Microsoft CJK IME: breaks editor parser (or focus is not returned to it)

Steps to reproduce

I couldn’t find reliable steps to reproduce.

Expected result

  • We can use normal mode
  • Render preview on the live preview editor

Actual result

  • We can’t use normal mode without reopening a pane
  • Don’t render preview on the live preview editor without reopening a pane

Environment

SYSTEM INFO:
Obsidian version: v0.15.7
Installer version: v0.15.6
Operating system: Windows 10 Pro 10.0.19044
Login status: logged in
Catalyst license: vip
Insider build toggle: on
Live preview: on
Legacy editor: off
Base theme: light
Community theme: Solarized
Snippets enabled: 1
Restricted mode: off
Plugins installed: 34
Plugins enabled: 33
1: Add Codemirror matchbrackets.js v1.0.0
2: Calendar v1.5.10
3: Cycle through Panes v0.0.12
4: Periodic Notes v0.0.17
5: Quick Switcher++ v2.0.2
6: Pane Relief v0.2.1
7: Advanced Tables v0.17.3
8: Emoji Toolbar v0.3.1
9: Tag Wrangler v0.5.3
10: Hotkey Helper v0.3.11
11: Hot Reload v0.1.8
12: Find unlinked files and unresolved links v1.5.2
13: Limelight v1.1.0
14: Enhance Copy Note v0.2.1
15: Publish and GitHub URL v0.4.4
16: Embedded Code Title v0.5.4
17: Tracker v1.10.9
18: Emoji Shortcodes v2.1.1
19: Footnote Shortcut v0.0.9
20: Obsidian42 - BRAT v0.6.34
21: Templater v1.12.0
22: Sort & Permute lines v0.5.1
23: Jump to link v0.4.2
24: Settings Search v1.2.0
25: Plugin Changelogs v1.3.0
26: Various Complements v7.0.6
27: Code Editor Shortcuts v1.9.0
28: Quick Explorer v0.1.32
29: Another Quick Switcher v5.4.1
30: Editor Syntax Highlight v0.1.3
31: Vim Yank Highlighter v1.1.3
32: Vimrc Support v0.6.2
33: Hover Editor v0.11.2

RECOMMENDATIONS:
Custom theme: for cosmetic issues, please first try updating your theme to latest. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community theme and snippets.
Community plugins: for bugs, please first try updating all your plugins to latest. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community plugins.

Additional information

MP4 (larger than 4MB)

For now, I have not encountered this issue in Obsidian v0.16.0 :blush:

Oh… It still doesn’t fix it in Obsidian v0.16.1 :sweat_smile:

I still don’t understand what this bug is about.

Is it still happening? Can you provide some reproducible steps?

@WhiteNoise
Yes. it is still happening.

Can you provide some reproducible steps?

There is no surefire way to reproduce this issue. That’s because it’s likely due to timing rather than logic.

If I intentionally degrade the machine’s performance (such as by changing the battery mode to power-saving mode), it becomes easier to reproduce the issue.

Can you post a screen recording of this happening in the sandbox vault?

@WhiteNoise
Sure :slight_smile:

I recorded it after the issue occurred. The restricted mode was on. There were no errors on the console. The version of Obsidian is v1.2.5. The OS is Windows11.

2023-04-23-01-01-51

In my experience, when using Microsoft IME to input Japanese and pressing Enter to confirm the candidate, I feel that an issue occurs when pressing ESC immediately afterward :thinking:

Now you are talking about about Japanese IME, you didn’t mention it before.
Does this happen in you don’t use any IME and just write with an English keyboard layout?

If you do this in source mode (not live preview) does syntax highlighting still works or it becomes broken there too?

I don’t know because I always write in Japanese on Obsidian. However, I’ll try to reproduce it.

I think this may be a vim+ime issue or ime-only issue and it’s not even tied to live preview.

It broke the syntax highlight even in source mode.

image

I have never encountered this issue when the Vim mode is disabled.

which IME are you using exactly?

Microsoft IME.