Vim cursor position different to line selected when window moved to different vitual desktop

When in normal mode, the vim cursor frequently “lags” a line behind that showing as selected in the gutter. Operations are performed on the line selected rather than where the cursor is placed. Furthermore, when insert mode is entered, the thin “insert” cursor appears aligned the selected line (as expected) but the fat “normal” mode cursor still shows in the adjacent line.

Steps to reproduce

  1. Move a note to it’s own window, out of the main Obsidian application window.
  2. Move that note to a different macOS desktop to the main Obsidian screen.
  3. Edit the note in Vim mode. The editing cursor will be on a different line to where the cursor was prior to editing, as per the screen gif attached.
  4. Move the note back to the same macOS desktop as the main Obsidian application window. The issue will no longer be present.

Expected result

The selected line and the cursor should always be aligned.

Actual result

The selected line and the vim cursor are one line apart when editing a note on a different macOS desktop to the main Obsidian application.


  • Operating system:
    macOS Monterey: v12.4
  • Debug info:

Obsidian version: v0.15.9
Installer version: v0.15.8
Operating system: Darwin Kernel Version 21.5.0: Tue Apr 26 21:08:22 PDT 2022; root:xnu-8020.121.3~4/RELEASE_X86_64 21.5.0
Login status: not logged in
Insider build toggle: off
Live preview: on
Legacy editor: off
Base theme: dark
Community theme: Obsidian Nord
Snippets enabled: 8
Restricted mode: off
Plugins installed: 41
Plugins enabled: 33
1: Calendar v1.5.10
2: Hotkeys++ v0.2.7
3: Natural Language Dates v0.6.1
4: Paste URL into selection v1.7.0
5: Review v1.6.4
6: Emoji Toolbar v0.3.1
7: Recent Files v1.3.3
8: Obsidian Link Converter v0.1.4
9: Cycle through Panes v0.1.0
10: Excalidraw v1.7.19
11: Mind Map v1.1.0
12: Note Folder Autorename v0.1.2
13: Note Refactor v1.7.1
14: Templater v1.13.0
15: Advanced Tables v0.17.3
16: Tracker v1.10.9
17: Contextual Typography v2.2.4
18: Dictionary v2.21.1
19: Outliner v3.0.0
20: QuickAdd v0.5.5
21: Sortable v0.2.6
22: Better Word Count v0.8.1
23: Ozan’s Image in Editor Plugin v2.1.4
24: Relative Line Numbers v2.0.1
25: Emoji Shortcodes v2.1.2
26: Editor Syntax Highlight v0.1.3
27: Quick Switcher++ v2.0.7
28: Dataview v0.5.43
29: Find orphaned files and broken links v1.6.1
30: Admonition v9.0.5
31: Vault Statistics v0.1.2
32: Tag Wrangler v0.5.3
33: Sliding Panes (Andy’s Mode) v3.3.0

Note: All plugins are up to date.

Additional information

This issue can be replicated in the Obsidian sandbox environment.

Screen video:
Obsidian--Vim Cursors Bug-2022-09-09_5322564

Does it happen in the sandbox vault?

  1. Does it happen in the sandbox vault?
  2. Does it happen in source mode?
  3. Does it happen here ?
  4. Does it happen here ?

Also we are gonna need repro steps. I will move this to help in the meantime.

  1. Yes.
  2. Yes. Once the issue appears, it can be seen in source and preview modes.
  3. I do not understand how to test in that environment. I am not a developer.*1
  4. I do not understand how to test in that environment. I am not a developer.*1

*1 If you can provide links to instructions how to test in those environments I will try.

@WhiteNoise I’ve determined the steps to reproduce the bug and have updated my previous posts on this. I think this should be moved back to the bug list.

Thanks. we can reproduce in 0.16.x too.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.