Copy a line without selecting it adds a line break at the end rather than the beginning (1.12.4)

Steps to reproduce

seems to occur with any text-editing part, but it is easier to see with bullet lists or checkboxes so using that as an example

  • create a list with multiple items
  • move cursor to end of any list item
  • copy to clipboard
  • paste from clipboard

Example bullet list, copying the second list item

- list item 1
- list item 2
- list item 3

cursor position:

Expected result

The entire line is copied to the clipboard with a line break at the beginning, so the pasted text is inserted as a new list item (generic: in a new line)

Copied text:

<!--line break before list item-->
- list item 2

Result after pasting:

- list item 1
- list item 2<!--line break before list item-->
- list item 2
- list item 3

This was the behaviour before 1.12.

Actual result

The line break is now added at the end of the copied text, causing the text to be inserted in the same line as the cursor then followed by a line break

Copied text:

- list item 2
<!--line break after list item-->

Result after pasting:

- list item 1
- list item 2- list item 2
<!--line break after list item-->
- list item 3

Environment

(Tested in sandbox vault)

SYSTEM INFO:
Obsidian version: 1.12.4
Installer version: 1.12.4
Operating system: Windows 10 Home 10.0.19045
Login status: logged in
Language: en-GB
Catalyst license: none
Insider build toggle: off
Live preview: on
Base theme: adapt to system
Community theme: none
Snippets enabled: 0
Restricted mode: on

RECOMMENDATIONS:
none

1 Like

I am also seeing this on Linux (Mint 22.3). I copy-paste bullets & lists frequently, so this has quickly become a fairly impacting bug.

duplicate of

1 Like