Vim Mode + Live preview: Bug when editing multiple headings with visual block mode

Steps to reproduce

This bug only occurs in live preview, not in source mode!

  1. Enable vim mode
  2. Create an empty note withtwo headings, e.g.:
# A
# B
  1. Put the cursor on the first line (heading A) and make the following keystrokes:
    Esc -> Ctrl + V -> j -> Shift + I
  2. Write “test”

Did you follow the troubleshooting guide? [Y/N]

Yes, the issue is reproducable in the sandbox vault and the troubleshooting steps have been followed.

Expected result

Expected result:

test# A
test# B

Actual result

Actual result:

# A
test# B

Both lines should have been edited (It seems the cursors disappear once you press j, which moves you to the next line and when live preview renders the heading, the last cursor is gone).

This works correctly in source mode.
This also works correctly when not dealing with headings.


Obsidian version: v1.4.5
Installer version: v1.3.4
Operating system: Windows 10 Pro 10.0.19044
Login status: logged in
Catalyst license: none
Insider build toggle: off
Live preview: on
Legacy editor: off
Base theme: dark
Community theme: none
Snippets enabled: 0
Restricted mode: on


Additional information

1 Like

I cannot confirm that the vertical selection and insertion is broken, it works for me.

I can confirm. It seems only to have an impact when two or more headers are not separated by normal text.