Ctrl C on an empty line should not copy the line

Use case or problem

I will try to explain this...

First I did a plugin duplicate line, just updated to do line copies like in VSC. it was not intentional but I came to the same behaviour…
So here is my problem related to this:
When doing a Ctrl C Ctrl V, sometime you do a mistake doing a second Ctrl C, which is not a problem because you put the cursor somewhere with no selection and the content of
the first copy stay the same (because no new selection where found). So you can still do another Ctrl V.
But in obsidian if you do this (the Ctrl V) you will trigger duplicate line.
It’s a good idea in theory this default behaviour in Obsidian, but this is quite difficult to find and remember when needed (first times of course), and I think it’s a shame to loose the behaviour of copy paste I’ve described.
Of course if there is a selection, it’s not working.
But it could prevent from loosing important temporary copy doing a typing error

1 Like

Are you saying Ctrl C on an empty line should not copy the line?

1 Like

yes for the reasons I gave before

Thanks. I’ve changed the thread title to make that clearer. (Was: “Ctrl C Ctrl V copy line.”)

2 Likes

Just replying to say that it doesn’t seem to behave this way with Cmd-C on MacOS. I don’t have access to Windows/Linux to test there.

In Mac, Cmd-C on no selection does not alter the clipboard, in my tests.

1 Like

Sorry to necro a thread, but please give us this! So much time wasted and often text lost from my (windows) computer registered ctrl + x twice and therefore obsidian dumping the highlighted selection I’d just cut to do a blank line instead.

VS code has a setting to prevent this: "editor.emptySelectionClipboard": false

Please for the love of accessibility for everything from fine motor control issues to wonky laptop keyboards that inconsistently register key presses, add the setting to prevent obsidian from adding empty lines to the clipboard.

I would also love this feature. It happens to me regularly that I’m trying to paste something into Obsidian and accidentally hitting ctrl C instead of ctrl V and being frustrated that when I do hit ctrl V I just get a duplicate of the line, rather than the thing I meant to copy. This feature has been an inconvenience to me often, and never helpful (it’s just too easy to select a whole line and copy it with a few keystrokes to ever rely on this), so I would love to be able to turn it off.

FWIW I think this is a duplicate of Option to disable Ctrl+C auto-copying entire line if nothing is selected, and instead do nothing

(Tried to edit the post above, but too late)

Looks like the moderators are linking people who ask in the help forum to this feature request, so for any future people who come here, that’s probably where you wanna go if you want to voice support for this feature