In Live Preview, selecting the beginning of a heading line should only select the text, not the #

Steps to reproduce

All operations are performed under the sandbox environment.

  1. Add a heading
    image
  2. Move the cursor elsewhere so that the # disappears.
    image
  3. Select any part of “Test Heading” that includes the first letter:
    image

Notice that the # character is also selected, and I suspect that this is buggy behavior.

As a user, I would like obsidian to select exactly the text I want to select.

Expected result

image

Actual result

image

Environment

  • Operating system:

Windows 11

  • Debug info:

SYSTEM INFO:
Obsidian version: v1.1.16
Installer version: v0.15.9
Operating system: Windows 10 Pro 10.0.22624
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: off
Plugins installed: 0
Plugins enabled: 0

RECOMMENDATIONS:
none


Additional information

For me, keyboard or mouse, if I select from the ‘test’ e to the right or from the g to the left and stop at the e in ‘test’, the heading isn’t selected. The # is only selected if I touch the first t.

Live preview is awesome but not perfect

I suggest you to activate source mode instead of live preview . Just add a checkmark to source mode, to do so open the menu with the vertical ellipse icon at the top right corner of your main window .

1 Like