CTRL copy behaviour
-
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.
-
@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 didCtrl+Z
to undo that and thenCtrl+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.
-
@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 -
@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. -
@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.
-
@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_LINECUTCtrl+X
andShift-Del
are mapped to Scintilla - SCI_CUT
As of v8.6.2 the default mapping is
Ctrl+L
is mapped to Scintilla - SCI_LINECUTCtrl+X
andShift-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 getCAN
characters in my files when I use it. UsingCtrl+X
does not seem to affect the contents of the copy/paste buffer. Both theCAN
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 thatCtrl+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 doCtrl+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
-
@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 stepThe 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).
-