I would also love to have a setting to disable this feature (copying the whole line when there’s no selection).
It happens to me regularly that I’m trying to paste something into Obsidian and I accidentally hit ctrl C
instead of ctrl V
, and then when I do hit ctrl V
I just get a duplicate of the line, rather than the thing I meant to paste. Usually you just have to go back and recopy the text, which is mildly frustrating, but the consequences get worse if you copied text from somewhere that is difficult or impossible to get back to (e.x. if you cut text from some file, save and close it, and then accidentally hit ctrl + C
when pasting into Obsidian, it may be difficult or impossible to recover the lost text).
This feature has often been an inconvenience to me, and never helpful (it’s just too easy to select a whole line and copy it with a few keystrokes), so I would love to be able to turn it off.
For reference, there have been at least a couple of other feature requests requesting this same thing too:
- Option to disable Ctrl+C auto-copying entire line if nothing is selected, and instead do nothing
- Ctrl C on an empty line should not copy the line - #6 by Graywaren
As evidence that this feature how it’s currently implemented violates the principle of least surprise, there are also multiple instances of people asking in the help forum about this and assuming it is a bug:
- Ctrl+C with no text selected copies the current line to the clipboard
- Copying or cutting when nothing is highlighted
- How to turn of copy unselected line?
I know VSCode also has this feature and I think it might even be enabled by default, but crucially they also have a setting to turn it off, which I make use of, and so do most of the people I asked in an informal survey of my coworkers just now.