Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Copy-paste sequences don't work right in all releases after 8.5.8 #15155

Open
1 task done
gamblehead opened this issue May 18, 2024 · 6 comments
Open
1 task done

Comments

@gamblehead
Copy link

gamblehead commented May 18, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Description of the Issue

Copy-paste sequence Ctrl+Insert -> Shift+Insert has stop working in all releases after 8.5.8. Its alternative Ctrl+C -> Ctrl+V works right but is less handy in some cases.
It seems that exactly Ctrl+Insert shortcut fails in this sequence as Shift+Insert works fine when there is some data in a clipboard buffer. Moreover sequence Shift+Delete -> Shift+Insert works in all new releases after 8.5.8.

As @alankilborn noted below npp portable version is not affected by this issue.

Steps To Reproduce

  1. Use Notepad++ version 8.6 - v8.6.7 (windows x64 or x86 installer version).
  2. Open text document and select line of text (I use Ctrl+arrow).
  3. Try to copy selected text via Ctrl+Insert shortcut.
  4. Try to paste selected text in another place via Shift+Insert shortcut.

Current Behavior

On step 4 Shift+Insert shortcut pastes nothing or some old data copied in clipboard buffer before.

Expected Behavior

Shift+Insert shortcut should paste exactly the text copied on step 3.

Debug Information

Notepad++ v8.5.8   (64-bit)
Build time : Oct 15 2023 - 21:43:56
Path : C:\Program Files\Notepad++\notepad++.exe
Command Line : 
Admin mode : OFF
Local Conf mode : OFF
Cloud Config : OFF
OS Name : Windows 10 Pro (64-bit)
OS Version : 22H2
OS Build : 19045.4412
Current ANSI codepage : 1251
Plugins : 
    DSpellCheck (1.4.24)
    mimeTools (2.9)
    NppConverter (4.5)
    NppExport (0.4)
    NPPJSONViewer (1.40)

Anything else?

No response

@alankilborn
Copy link
Contributor

Works just fine for me in 8.6.7.

Notepad++ v8.6.7 (64-bit)
Build time : May 12 2024 - 20:04:00
Path : C:\NotepadPlusPlus\Misc_NoBackup\Releases\npp.8.6.7\npp.8.6.7.portable.x64\notepad++.exe
Command Line : -multiInst
Admin mode : OFF
Local Conf mode : ON
Cloud Config : OFF
Periodic Backup : ON
OS Name : Windows 11 Pro (64-bit)
OS Version : 23H2
OS Build : 22631.3593
Current ANSI codepage : 1252
Plugins :
mimeTools (3.1)
NppConverter (4.6)
NppExport (0.4)

@gamblehead
Copy link
Author

Works just fine for me in 8.6.7.

Notepad++ v8.6.7 (64-bit) Build time : May 12 2024 - 20:04:00 Path : C:\NotepadPlusPlus\Misc_NoBackup\Releases\npp.8.6.7\npp.8.6.7.portable.x64\notepad++.exe Command Line : -multiInst Admin mode : OFF Local Conf mode : ON Cloud Config : OFF Periodic Backup : ON OS Name : Windows 11 Pro (64-bit) OS Version : 23H2 OS Build : 22631.3593 Current ANSI codepage : 1252 Plugins : mimeTools (3.1) NppConverter (4.6) NppExport (0.4)

@alankilborn Thanks for your response and debug information included. I see you use portable version (at least in check of issue reported). I use x64 installer version. I have checked portable npp version and approve Ctrl+Insert works fine in it. Nevertheless installer version (windows x64 or x86) is affected by mentioned issue.

@alankilborn
Copy link
Contributor

There is no difference in the executable for portable vs. installed version.
How are your shortcuts set up?
Mine are set this way:

image

@gamblehead
Copy link
Author

I have never reassign shortcuts after install npp. I use application (version 8.5.8 and following) "as is".
Due to your question I have note one odd thing in Shortcut mapper - there are no shortcuts Copy, Cut and Paste in application version 8.5.8 at all. Combinations Ctrl+C, Ctrl+X, Ctrl+V, Ctrl+INS, Shift+DEL, Shift+INS are unassigned in Shortcut mapper. But all these operations work fine. Guess they are implemented as default behavior.

In Shortcut mapper of npp.8.6.7.portable.x64 I see exact the same assignments as in your screenshot.

And finally when I install Notepad++ v8.6.7 (64-bit) the conflict in Shortcut mapper appears:
изображение
Combination Ctrl+INS has no assignment at all.
I have modified one of Copy assignment to Ctrl+INS and issue was solved.

@alankilborn thanks a lot for your efforts in revealing of issue root.

As for issue itself I think default Shortcut mapper table is corrupted in windows installer. It could be useful to check it in project.

Notepad++ v8.6.7   (64-bit)
Build time : May 12 2024 - 20:04:00
Path : C:\Program Files\Notepad++\notepad++.exe
Command Line : "C:\Program Files\Notepad++\change.log" 
Admin mode : OFF
Local Conf mode : OFF
Cloud Config : OFF
Periodic Backup : ON
OS Name : Windows 10 Pro (64-bit)
OS Version : 22H2
OS Build : 19045.4412
Current ANSI codepage : 1251
Plugins : 
    mimeTools (3.1)
    NppConverter (4.6)
    NppExport (0.4)
    NPPJSONViewer (1.40)

@alankilborn
Copy link
Contributor

I have note one odd thing in Shortcut mapper - there are no shortcuts Copy, Cut and Paste in application version 8.5.8 at all. Combinations Ctrl+C, Ctrl+X, Ctrl+V, Ctrl+INS, Shift+DEL, Shift+INS are unassigned in Shortcut mapper. But all these operations work fine. Guess they are implemented as default behavior.

No, if they were implemented as "default behavior" there wouldn't be a reason to show them in Shortcut Mapper.


I think default Shortcut mapper table is corrupted in windows installer.

The way it works is that if you change a shortcut mapping, a line is placed in shortcuts.xml, noting the "override". If you do no changes, there are no lines pertaining to shortcuts in the file. Thus, your "installed" file should be the same as one used with a portable version -- no shortcut overrides. So, I don't think there is any "corruption due to the installer" here (since you were adamant about not having changed any shortcuts: "I have never reassign shortcuts")

@Coises
Copy link
Contributor

Coises commented May 22, 2024

Due to your question I have note one odd thing in Shortcut mapper - there are no shortcuts Copy, Cut and Paste in application version 8.5.8 at all. Combinations Ctrl+C, Ctrl+X, Ctrl+V, Ctrl+INS, Shift+DEL, Shift+INS are unassigned in Shortcut mapper. But all these operations work fine. Guess they are implemented as default behavior.

Those used to be on the Scintilla commands tab of the shortcut mapper.

I know this is unlikely, but if you happen to have system backups that can show the “evolution” of %appdata%\Notepad++\shortcuts.xml between its condition when everything was working and the point where you noticed things were messed up, it might be possible to trace how it went wrong. My guess (not a very secure one) is that there might be some sequence of upgrades, downgrades, reupgrades that can mess up that file so that what you described can happen. I also suspect it will be an unusual condition that is impractical to fix... but if you care and have the data, it might be possible to track down the cause.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants