-
Notifications
You must be signed in to change notification settings - Fork 542
Open
Labels
Description
Describe the bug
Clipboard history gets overwritten by commands like Linkify, which are expected to alter the current item only
To Reproduce
- Save Linkify command as
linkify.iniand Load it from the Commands dialog - Copy
https://example.com/foo, first entry is created with the linkified content<a href="https://example.com/bar">https://example.com/bar</a>or whatever - Copy
https://example.com/bar, a second entry is created correctly AND the first entry, now index 2, is modified to be/bar
Expected behavior
Clipboard history is not corrupted
Screenshots
Version, OS and Environment
-
CopyQ Clipboard Manager 13.0.0
-
Qt: 6.8.3
-
KNotifications: 6.12.0
-
Compiler: MSVC
-
Arch: x86_64-little_endian-llp64
-
OS: Windows 10 Version 22H2
-
Installation method: Windows installer
Additional context
Like #3381 suspected some old backup was at fault, so I used Windows Sandbox with a fresh install. For all users, for current user, with and without translations activated. It't not because of restoring old backups, happens fresh too.
Workaround
Adding add(getItem(0)) and remove(1) seems to fix the overwriting
[Command]
Automatic=true
Command="
copyq:
add(getItem(0))
const link = str(input());
const href = `<a href=\"${link}\">${link}</a>`;
setData('text/html', href);"
remove(1)
Icon=\xf127
Input=text/plain
Match=^(https?|ftps?|file|mailto)://
Name=Linkify
Reactions are currently unavailable