Community
    • Login

    Does anyone else hate "Enable Copy/Cut Line without selection"?

    Scheduled Pinned Locked Moved General Discussion
    16 Posts 5 Posters 570 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Alan KilbornA
      Alan Kilborn
      last edited by

      Does anyone else hate Enable Copy/Cut Line without selection?

      c12ea44a-eb90-45ef-9ffa-1b6e70a3cbc8-image.png

      Here’s why I hate it:

      Ctrl+c and Ctrl+v are too darned close to each other on the keyboard. I often fat-finger a Ctrl+c when I mean to do a Ctrl+v. When I do this it is likely that I have no selected text, and BOOM, my data in the clipboard, that I really wanted to (and intended to) paste is now GONE, replaced with something I don’t want – more often than not a blank line.

      So you’ll tell me to simply uncheck the checkmark for Enable Copy/Cut Line without selection. And that works to solve the problem of the prior paragraph.

      BUT…that causes a new problem: Ctrl+c will now no longer work in the Search results window. ARRRRGH! This is a bug, and I’ve REPORTED IT, but thus far (and through at least 1 release cycle) it hasn’t been fixed. :-(

      CoisesC 1 Reply Last reply Reply Quote 4
      • CoisesC
        Coises @Alan Kilborn
        last edited by

        @Alan-Kilborn said in Does anyone else hate "Enable Copy/Cut Line without selection"?:

        BUT…that causes a new problem: Ctrl+c will now no longer work in the Search results window. ARRRRGH! This is a bug, and I’ve REPORTED IT , but thus far (and through at least 1 release cycle) it hasn’t been fixed.

        More fallout from changing cut/copy/paste to be Notepad++ commands instead of being local to whatever control has focus.

        The keyboard shortcuts (and presumably toolbar buttons, though I don’t use a toolbar so I haven’t checked) fail because the main menu items are disabled.

        Note that if you select some text in the edit window before you select something in the search results, the copy will work.

        Presumably the same glitch occurs with at least some plugins with docking dialogs (unless they use NPPM_MODELESSDIALOG… remember that kerfuffle?). It might be that few people have unchecked the option in question, so few people have noticed this.

        I left a comment on the issue in GitHub.

        Alan KilbornA 1 Reply Last reply Reply Quote 4
        • Alan KilbornA
          Alan Kilborn @Coises
          last edited by

          @Coises said :

          It might be that few people have unchecked the option in question, so few people have noticed this.

          It boggles my mind that no one has the same problem I do – fat fingering Ctrl+c when trying to hit Ctrl+v. If only “paste” had been made as Ctrl+p many years ago…

          If this bug doesn’t get fixed soon, perhaps I’ll subclass Search results and listen for WM_KEYDOWN with Ctrl+c, and do my own copy-to-clipboard.

          CoisesC datatraveller1D 2 Replies Last reply Reply Quote 1
          • CoisesC
            Coises @Alan Kilborn
            last edited by

            @Alan-Kilborn said in Does anyone else hate "Enable Copy/Cut Line without selection"?:

            If this bug doesn’t get fixed soon, perhaps I’ll subclass Search results and listen for WM_KEYDOWN with Ctrl+c, and do my own copy-to-clipboard.

            Not tested at this point, but I don’t think that will work. The message loop gets keyboard input first; before it even dispatches it to the focused window, TranslateAccelerator will recognize it as an accelerator for a disabled menu command and it won’t propagate any further.

            I can guess that the reason it hasn’t been fixed yet is that it’s non-trivial to fix it without mucking about in places where it’s likely to cause something else to go wrong. Making Ctrl+C/X/V application-level accelerators made a lot of things more complicated. Hindsight makes one wish the desired changes to cut/copy/paste function had been accomplished by subclassing the Scintilla edit controls instead… but I doubt that choice will be reconsidered now.

            1 Reply Last reply Reply Quote 0
            • datatraveller1D
              datatraveller1 @Alan Kilborn
              last edited by datatraveller1

              @Alan-Kilborn said in Does anyone else hate "Enable Copy/Cut Line without selection"?:

              t boggles my mind that no one has the same problem I do – fat fingering Ctrl+c when trying to hit Ctrl+v.

              Yes, I have the same fat fingering problem. Often I want to hit Ctrl+C but press Ctrl+V which is even worse :-)

              Alan KilbornA 1 Reply Last reply Reply Quote 1
              • MarkusBodenseeM
                MarkusBodensee
                last edited by

                This topics looks more like a complaint topic to put into Boycott Notepad++.

                And Alan, you are a skilled programmer from what I saw until now. Why don’t you create a PR instead of complaining? ;-)

                Alan KilbornA 1 Reply Last reply Reply Quote 0
                • Alan KilbornA
                  Alan Kilborn @MarkusBodensee
                  last edited by Alan Kilborn

                  @MarkusBodensee said:

                  looks more like a complaint topic to put into Boycott Notepad++

                  Hardly.

                  Why don’t you create a PR instead

                  No way am I going to try to un-mess the whole debacle, as mentioned by @Coises .
                  I’m more likely to write the script I mentioned to work around the problem.

                  MarkusBodenseeM CoisesC 2 Replies Last reply Reply Quote 1
                  • MarkusBodenseeM
                    MarkusBodensee @Alan Kilborn
                    last edited by

                    @Alan-Kilborn said:

                    Hardly.

                    Sorry… but using the word “hate” in your post is a clear indication that it would be right over there.

                    1 Reply Last reply Reply Quote 0
                    • Alan KilbornA
                      Alan Kilborn @datatraveller1
                      last edited by

                      @datatraveller1 said in Does anyone else hate "Enable Copy/Cut Line without selection"?:

                      Often I want to hit Ctrl+C but press Ctrl+V which is even worse

                      Oddly, I don’t seem to be plagued by that variant.
                      Actually, I don’t think that is worse because you can usually Ctrl+z undo it.
                      There is no undo for destroying the clipboard content (by trying to do Ctrl+v and mistakenly doing Ctrl+c).

                      datatraveller1D PeterJonesP 2 Replies Last reply Reply Quote 0
                      • datatraveller1D
                        datatraveller1 @Alan Kilborn
                        last edited by datatraveller1

                        @Alan-Kilborn Yes, but the issue with my variant is that I think I have copied something but actually cut it, and sometimes even don’t notice that it was cut and not copied so the cut content is lost e.g. from a database field. However, my issue is not a Notepad++ issue, it is a general MS Windows fat fingering problem.

                        But thinking again of your variant - I am also plagued by your variant, so you are not the only one :-)

                        1 Reply Last reply Reply Quote 1
                        • CoisesC
                          Coises @Alan Kilborn
                          last edited by Coises

                          @Alan-Kilborn said in Does anyone else hate "Enable Copy/Cut Line without selection"?:

                          un-mess the whole debacle

                          Would it be less obnoxious if Edit | Copy and Cut were never disabled on the menu; that is, even when Enable Copy/Cut Line without selection is unchecked and nothing is selected, they would still be enabled: they just wouldn’t do anything?

                          If I understand the code correctly, that would be an easy “fix” that wouldn’t be likely to cause unexpected side-effects.

                          Edit to add: The next least complicated way I can think of to fix this would be to create a “proxy” command that doesn’t appear on the menu, to which Ctrl+C/Ctrl+Insert can attached as a keyboard accelerator. Unlike the command that appears on the menu, the proxy command would never be disabled, allowing WM_COPY to be passed on to whatever control has focus. The same should be done for Ctrl+X/Shift+Delete, assuming I am correct that this also affects some docking dialogs (which I still haven’t verified).

                          Alan KilbornA 1 Reply Last reply Reply Quote 2
                          • PeterJonesP
                            PeterJones @Alan Kilborn
                            last edited by

                            @Alan-Kilborn said in Does anyone else hate "Enable Copy/Cut Line without selection"?:

                            There is no undo for destroying the clipboard content (by trying to do Ctrl+v and mistakenly doing Ctrl+c).

                            I would have thought that Edit > Clipboard History would allow an undo for Ctrl+C – or that an external Clipboard-history tool would have that (and I thought you recently mentioned that you used one of those external clipboard tools when it came up in another discussion).

                            (Yes, E>CH isn’t a solution if you didn’t already have that panel open… but I would think the external clipboard tools were always running)

                            Alan KilbornA 1 Reply Last reply Reply Quote 1
                            • Alan KilbornA
                              Alan Kilborn @PeterJones
                              last edited by Alan Kilborn

                              @PeterJones said:

                              and I thought you recently mentioned that you used one of those external clipboard tools when it came up in another discussion

                              I do, but it is a pain to have to go there to get data, when I just had it. :-)

                              1 Reply Last reply Reply Quote 2
                              • Alan KilbornA
                                Alan Kilborn @Coises
                                last edited by

                                @Coises said :

                                Would it be less obnoxious if Edit | Copy and Cut were never disabled on the menu; that is, even when Enable Copy/Cut Line without selection is unchecked and nothing is selected, they would still be enabled: they just wouldn’t do anything? If I understand the code correctly, that would be an easy “fix” that wouldn’t be likely to cause unexpected side-effects.

                                I don’t like it that much but…If it fixes the larger problem it’s an acceptable trade-off.

                                The next least complicated way I can think of to fix this would be to create a “proxy” command that doesn’t appear on the menu, to which Ctrl+C/Ctrl+Insert can attached as a keyboard accelerator. Unlike the command that appears on the menu, the proxy command would never be disabled, allowing WM_COPY to be passed on to whatever control has focus. The same should be done for Ctrl+X/Shift+Delete, assuming I am correct that this also affects some docking dialogs (which I still haven’t verified).

                                I do like this better as a N++ user, because I don’t see it. But it probably complicates the code too much to be accepted.


                                Anyway @Coises, if you want to get involved and try to fix this, you’d have my thanks.

                                1 Reply Last reply Reply Quote 0
                                • Alan KilbornA
                                  Alan Kilborn
                                  last edited by Alan Kilborn

                                  It appears a fix for Ctrl+c being broken in Search results has just been PUBLISHED, so hopefully future discussion on this is moot.

                                  1 Reply Last reply Reply Quote 4
                                  • Alan KilbornA
                                    Alan Kilborn
                                    last edited by

                                    I had forgotten that some else has the same fat fingers that I do, and thus shared my pain; it’s a bit of a rant, but some good reading: https://github.com/notepad-plus-plus/notepad-plus-plus/issues/15480

                                    1 Reply Last reply Reply Quote 1
                                    • First post
                                      Last post
                                    The Community of users of the Notepad++ text editor.
                                    Powered by NodeBB | Contributors