This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 192613

Summary: Disable cut/copy line when no selection is made.
Product: editor Reporter: jcrada <jcrada>
Component: Key bindingsAssignee: David Strupl <dstrupl>
Status: REOPENED ---    
Severity: normal CC: cezariusz
Priority: P4    
Version: 6.x   
Hardware: PC   
OS: Linux   
Issue Type: ENHANCEMENT Exception Reporter:

Description jcrada 2010-11-29 03:45:30 UTC
Hi,

In current version, if you press Ctrl+X or Ctrl+C when no selection is made, then the line where the pointer is gets "cut" or "copied" to the clipboard. This behavior is not common among all platforms, and to be honest I really hate it.

I tried to find how to disable such behavior but I could not find the shortcut to disable it.

Cheers,

Juan.
Comment 1 David Strupl 2010-11-29 12:46:41 UTC
This behaviour is intentional. I am sorry you hate it but there are users who love it. There is no plan to change it.
Comment 2 jcrada 2010-11-29 17:53:58 UTC
Ok, but I was just wondering if you could add this to the Netbeans shortcuts bindings and give us the choice to activate it or not (I am pretty sure Eclipse has it on its shortcuts bindings). I understand that people like it, but what I find misleading is that the main OSs (i.e. Windows, Mac OS, and Ubuntu Linux) do not have that behavior.
So I was just hoping you guys could add it to the shortcuts bindings, that's it.

Thanks, though, for the hard work on netbeans.

Cheers,

Juan
Comment 3 Zom-B 2014-03-07 08:54:38 UTC
I don't care if it's intentional. Even if some minor programs like IDEA uses it, it's not 'Standard' behavior.

In fact this behavior is even dangerous when using standard Windows shortcuts (as opposed to IBM Common User Access shortcuts like Ctrl+Ins). More than often I wanted to paste something at the cursor location, and my finger accidentally hits the C before the V, causing it to copy the entire line (losing my clipboard contents) and pasting that at the cursor location. The problem gets worse when the thing I copied comes from the redo buffer, which is immediately destroyed, so I'm unable to re-obtain what I previously copied.

Please reconsider adding this option.
Comment 4 jcrada 2014-03-07 09:04:30 UTC
It has been about three years since this "feature" was enforced. I have used NetBeans pretty much on a daily basis and I have never used it, but the problem is that very often I am more concerned about whether I replaced the contents of the clipboard or I removed a line from my file.

It is NOT standard behaviour and it should be made an optional choice.
Comment 5 Jiri Prox 2014-03-07 09:08:42 UTC
> More than often I wanted to paste something at the cursor location, and my
> finger accidentally hits the C before the V, causing it to copy the entire
> line (losing my clipboard contents) and pasting that at the cursor location.
> The problem gets worse when the thing I copied comes from the redo buffer,
> which is immediately destroyed, so I'm unable to re-obtain what I previously
> copied.
> 

The Netbeans has clipboard history, so you can use it to get content of previous clipboards, no data are lost
Comment 6 ianfer 2015-07-25 00:01:10 UTC
I find this incredibly annoying. i use space-ctrl-arrow to select lines. sometimes when i kill a line with cmd-c or cmd-x, i dont notice it and something breaks later on.

looked and looked in prefs, but there's no way to disable this.

the program is great, but not being able to disable this makes it a lot less great.

this "feature" can be disabled in idea and that's the first thing i change.

this "feature" can go straight to hell.
Comment 7 cezariusz 2015-07-28 07:25:31 UTC
(In reply to ianfer from comment #6)
> i use space-ctrl-arrow to select lines.

What?

Please don't remove this feature, it's very useful when you know how to use it. It's way faster to copy a line when the cursor is anywhere in the line, than to select it (Home, Home, Shift+Down, Ctrl+C).

But it might be a good idea to add an option to disable this behavior, to make everyone happy.
Comment 8 andreaslangsays 2016-06-29 08:04:41 UTC
Hello,

I'm also looking for a way to disable this behaviour.
It is annoying for me as I never use it intentionally but very often accidentionally.
I'm looking for a way to disable it in options, please provide an opt out for that!
Thank you!
Andreas