Disable copying entire line when nothing is selected in Intellij
Solution 1:
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
.
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.
Solution 2:
In Mac OS X:
- Press cmd+shift+a.
- Type
registry
and press return to open the Registry. - Enable the
editor.skip.copy.and.cut.for.empty.selection
option. - Click Close.