Wish Empty selection wipes clipboard using CTRL+C/CTRL+V

Discussion in 'Bugs & wishlist' started by Ikkuh, Aug 4, 2019.

Tags:
  1. Ikkuh

    Ikkuh New Member

    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?
     
    inakigarm and agraham like this.
  2. Sandman

    Sandman Well-Known Member Licensed User

    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.
     
  3. agraham

    agraham Expert Licensed User

    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.
     
    Ikkuh likes this.
  4. Ikkuh

    Ikkuh New Member


    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.
     
  5. Sandman

    Sandman Well-Known Member Licensed User

    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:
    Code:
    // 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.
     
  6. Ikkuh

    Ikkuh New Member

    Yes, you are correct. But many other dev. editors / IDE's I did use and behaving differently

    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.
     
  7. AnandGupta

    AnandGupta Active Member Licensed User

    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.

    Regards,

    Anand
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice