• Login
Community
  • Login

CTRL copy behaviour

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
8 Posts 3 Posters 627 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.
  • S
    Samantha Traynor
    last edited by Jan 11, 2024, 4:42 PM

    Hello, not sure if this is a problem with the program or if its already like this but, in the recent days i updated to the version of notepad which is the 8.6.1 (i was on 8.5.2) and as far as i been using it i noticed something that im not sure if its normal or not but i remember it didn’t happened before, so when i try to ctrl+c for copy something then if a mistake happen i hit ctrl+z to undo, but after doing that it seems that it also resets of what i have copied (with ctrl + c) and it pastes nothing, i remember this didn’t used to happened before on the previous version that i was.

    M 1 Reply Last reply Jan 11, 2024, 5:18 PM Reply Quote 1
    • M
      mkupper @Samantha Traynor
      last edited by Jan 11, 2024, 5:18 PM

      @Samantha-Traynor I can’t reproduce what you described. With Notepad++ v8.6.1 I selected some text and then did Ctrl+C to load it into the copy/paste buffer. Then, down at the bottom of my file I type some random text and then did Ctrl+Z to undo that and then Ctrl+V to paste whatever is in the clipboard. The text I had loaded into the copy/paste buffer was pasted into the file, as expected.

      Please provide step-by-step details for how to reproduce what you reported. It may help others follow along if you also show what you did, what happened, and what you expected to happen.

      S 1 Reply Last reply Jan 11, 2024, 5:45 PM Reply Quote 2
      • S
        Samantha Traynor @mkupper
        last edited by Jan 11, 2024, 5:45 PM

        @mkupper No actually my bad, after doing further testing, seems not to be a problem related with undo but instead is that whatever i copy something then do a line cut (sci_linecut which by default is Ctrl+L but i have it as Ctrl+X) then paste of what i have copied, it pastes the wrong thing, sometimes it pastes nothing and sometimes pastes like whole line of what i deleted, heres an example (imgur url) of what im trying to do, probably doesn’t show much but what i did was

        1.Copy certain part of a text
        2.Delete line thats not longer needed using sci_linecut (Ctrl+L)
        3.Paste of what was copied but ends up with not being the first step

        M C 2 Replies Last reply Jan 11, 2024, 5:56 PM Reply Quote 1
        • M
          mkupper @Samantha Traynor
          last edited by Jan 11, 2024, 5:56 PM

          @Samantha-Traynor Try installing the newly release 8.6.2. There were some changes related to sci_linecut introduced in v8.6 with v8.6.1 and then v8.6.2 attempting to deal with the resulting issues.

          S 1 Reply Last reply Jan 11, 2024, 6:07 PM Reply Quote 2
          • S
            Samantha Traynor @mkupper
            last edited by Jan 11, 2024, 6:07 PM

            @mkupper I installed the new version and so far the problem still seems to happen sadly, whanever a certain part of text is copied then linecut is used, when pasting of what was copied previous won’t work and instead pastes nothing or even wrong text.

            M 1 Reply Last reply Jan 11, 2024, 7:10 PM Reply Quote 0
            • M
              mkupper @Samantha Traynor
              last edited by Jan 11, 2024, 7:10 PM

              @Samantha-Traynor, part of what happened in the v8.6 and succeeding changes is that some of the logic related to handling of the Ctrl+C/V/X keys was shifted from Scintilla to Notepad++. It should not have impacted you…

              In Notepad++ v8.5.8 which was the last one before v8.6

              • Ctrl+L is mapped to Scintilla - SCI_LINECUT
              • Ctrl+X and Shift-Del are mapped to Scintilla - SCI_CUT

              As of v8.6.2 the default mapping is

              • Ctrl+L is mapped to Scintilla - SCI_LINECUT
              • Ctrl+X and Shift-Del are mapped to Main menu - Cut

              We know Ctrl+X is now mapped into Notepad++ and not Scintilla.

              I discovered I can remove the shortcut for Ctrl+X in v8.6.2 and get CAN characters in my files when I use it. Using Ctrl+X does not seem to affect the contents of the copy/paste buffer. Both the CAN and not affecting the copy/paste buffer are what I would expect.

              I then added Ctrl+X as one of the mappings for Scintilla 90 - SCI_LINECUT and found that Ctrl+X seems to behave like SCI_LINECUT as expected. If I put some text in the copy/paste buffer, go to a line, and then do Ctrl+X then the line disappears and its contents are now in the copy/paste buffer.

              Though the user interface does not show it, SCI_LINECUT is Scintilla command code 2337 and that’s what gets recorded in the shortcuts.xml file. Thus, while we talk about things such as Scintilla 93 or SCI_LINECUT that’s to help us humans. Internally, Notepad++ and Scintilla use 2337 meaning the shortcuts should be the same from version to version of the software when using the same shortcuts.xml file.

              Thus, I’m still trying to figure out if and how to reproduce what you are experiencing and likely need more detail, but am unsure of what to ask for. Maybe it would help to show your shortcuts.xml file contents. Do it by putting ``` (backticks) on a line by itself followed by the contents of the shortcuts.xml file followed by another ``` line

              1 Reply Last reply Reply Quote 0
              • C
                Coises @Samantha Traynor
                last edited by Coises Jan 11, 2024, 7:36 PM Jan 11, 2024, 7:35 PM

                @Samantha-Traynor said in CTRL copy behaviour:

                @mkupper No actually my bad, after doing further testing, seems not to be a problem related with undo but instead is that whatever i copy something then do a line cut (sci_linecut which by default is Ctrl+L but i have it as Ctrl+X) then paste of what i have copied, it pastes the wrong thing, sometimes it pastes nothing and sometimes pastes like whole line of what i deleted, heres an example (imgur url) of what im trying to do, probably doesn’t show much but what i did was

                1.Copy certain part of a text
                2.Delete line thats not longer needed using sci_linecut (Ctrl+L)
                3.Paste of what was copied but ends up with not being the first step

                The example you show is behaving as expected. LINECUT means cut and store in the clipboard. If you don’t want to change the clipboard contents, use LINEDELETE (Ctrl+Shift+L).

                S 1 Reply Last reply Jan 11, 2024, 7:41 PM Reply Quote 2
                • S
                  Samantha Traynor @Coises
                  last edited by Jan 11, 2024, 7:41 PM

                  @Coises Oh so thats what was wrong, i forgot that cut in common, its the same as copy from and paste but with the deletion, my mistake, after doing some changes on the shortcuts to the same setup that i had before now everything works good as before thank you and @mkupper too for the help still

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