I have recently started using Intellij and I noticed that by default, when you do ctrl+c for copying something when you have nothing selected, it copies the entire line into the clipboard overriding what I had in there before.
This is really annoying yet I cannot seem to figure out how to disable it. I am aware that there is a paste history you can use however this is not what I am after, I just want to disable it like you can do with sublime text.
Is there a way to disable this behaviour so that when I press ctrl+c and nothing is selected it just leaves the clipboard alone?
Since version 2021.2 there is a dedicated Don't copy/cut the current line when invoking the Copy or Cut action with no selection
setting for this in Preferences | Advanced Settings
on the Mac, Settings | Advanced Settings
on other platforms.
For older IntelliJ Platform based IDE's the setting is more hidden:
Invoke Help | Find Action...
(Ctrl (Cmd on Mac)+Shift+A), type Registry and select the Registry...
item that appears. Enable the editor.skip.copy.and.cut.for.empty.selection
option there. Be careful with the other configuration options, because it is possible to break your IntelliJ IDEA installation with an incorrect setting.