I like the BX editor a lot but I noticed a small but important difference using the most common shortcuts CTRL+C/CTRL+X and CTRL+V to other developer editors.
If you copy/cut a part of your sourcecode using CTRL+C/CTRL+X and accidentally hit again CTRL+C instead of CTRL+V then your clipboard is wiped. This happens me several times a day.
Could you please change this the way for instance Notepad++ and Textpad handle this?
What you describe sounds perfectly correct to me. What probably happens is that the second CTRL+C/CTRL+X copies/cuts a blank line. This behaviour is exactly like it is in Sublime Text, for instance.
The reasoning is that if there is no selection made, the command acts on the whole line. And if that line is empty, well, then you just copied something empty.
That's the whole point of the request. Notepad++ will not make a copy when there is no text selected and so will maintain the contents of the clipboard. I would also find this useful as I also occasionally hit Ctl+C when I mean to hit Ctl+V and so lose the block of text I have just cut.
What you describe sounds perfectly correct to me. What probably happens is that the second CTRL+C/CTRL+X copies/cuts a blank line. This behaviour is exactly like it is in Sublime Text, for instance.
The reasoning is that if there is no selection made, the command acts on the whole line. And if that line is empty, well, then you just copied something empty.
To be honest I never experienced this behavior with any editor. Even bigger word processors like Libre office's Writer does it like I subscribed.
The function of CTRL+C is copying anything selected. With no selection the clipboard shouldn't copy anything. So the clipboard shouldn't be wiped.
Which just goes to show that you've never used Sublime Text, for instance.
This behaviour is defined by a setting in Sublime Text, and this is the default value:
B4X:
// If true, the copy and cut commands will operate on the current line
// when the selection is empty, rather than doing nothing.
"copy_with_empty_selection": true,
I wouldn't mind having this as a setting in the .ini for B4X, but I would appreciate the default staying as it is.
Just adding my opinion, and support for the current way of doing things.
I understand and of course I respect people having other opinions, but still think it isn't logical. For me personal I think is isn't correct if CTRL+C wipes the clipboard if there is nothing to copy.
Well, many text editors behave differently for ctr+c, some even have options for that !
But none can fix my bad habit of pressing ctrl+c on a selected text instead of ctrl+v, which I intended !!
So I use use clipboard manager. Peace of mind.