Buggy visual-line navigation using current codemirror-vim

Note: This is a bug in codemirror-vim. The fix is to upgrade to codemirror-vim version 6.2.1. :slightly_smiling_face:

Steps to reproduce

  • In VIM mode, write a line of text that wraps onto 3 lines
  • With your cursor on the first character of the first line, type “gj” (move down one visual line) twice. You should be at the first character of the third line.
  • Type “gk”

Expected result

Cursor should move to the first character of the next line up (line 2, following the steps above).

Actual result

Cursor skips a line, moving to line 1 using the steps above.

Environment

SYSTEM INFO:
	Obsidian version: v1.6.7
	Installer version: v1.5.3
	Operating system: Windows 10 Home 10.0.19045
	Login status: logged in
	Catalyst license: none
	Insider build toggle: off
	Live preview: on
	Base theme: adapt to system
	Community theme: Minimal v7.7.9
	Snippets enabled: 0
	Restricted mode: on


Additional information

This is the result of a bug in codemirror-vim that was reported here: replit/codemirror-vim#165. It was fixed in this commit.

In the codemirror-vim issue there is a link to a an already open bug report in Obsidian, is there a reason why you decided to open another thread?

Sincere apologies; I actually missed that, embarrassingly. Please feel free to lock this. Appropriate thread, for posterity: Vim `gk` at the head of line goes 2 line up

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