Bug 471515 - CTRL + C sometimes not copying when image in clipboard
Summary: CTRL + C sometimes not copying when image in clipboard
Status: CONFIRMED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Clipboard widget & pop-up (show other bugs)
Version: 5.27.5
Platform: Debian unstable Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-06-27 19:35 UTC by Alexis Murzeau
Modified: 2024-09-02 12:59 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Screenrecording of copy (CTRL+C) not working when an image is in the clipboard (587.97 KB, video/mp4)
2023-06-27 19:39 UTC, Alexis Murzeau
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexis Murzeau 2023-06-27 19:35:32 UTC
SUMMARY

Copying something after having an image in the clipboard will clear the clipboard instead of copying.
This happens only when the clipboard history is limited to 1 entry.

STEPS TO REPRODUCE
1. Configure the clipboard history to have:
  - 1 entry history
  - See video for all other configuration, but I'm don't think that's need beyond the history depth
2. Press `PrtScn` key to open Spectacle
3. Click on the Copy button of Spectacle repeatedly.
  - This will alternatively put the image in the clipboard and clear the clipboard.
4. Click on the Copy button of Spectacle so the image is in the clipboard
5. Copy a text, this will clear the clipboard instead of copying the text
6. Try to paste, nothing is pasted as the clipboard is cleared (expected: the copied text should be pasted)

OBSERVED RESULT
See video in attachment that show how to reproduce.
When the clipboard is cleared unexpectedly (when copying something while having an image in the clipboard), the copied object (image or text) can't be pasted (which is probably explained by the fact that it cleared the clipboard instead).

EXPECTED RESULT

When copying something while having an image already in the clipboard, it should be replaced with the newly copied stuff (even if the history depth is only 1 entry).

SOFTWARE/OS VERSIONS
Operating System: Debian GNU/Linux 12
KDE Plasma Version: 5.27.5
KDE Frameworks Version: 5.107.0
Qt Version: 5.15.8
Kernel Version: 6.3.0-1-amd64 (64-bit)
Graphics Platform: X11
Processors: 12 × AMD Ryzen 5 3600 6-Core Processor
Memory: 15.6 Gio of RAM
Graphics Processor: AMD Radeon RX 580 Series
Manufacturer: Micro-Star International Co., Ltd
Product Name: MS-7B86
System Version: 4.0

Spectacle version 23.04.2
Comment 1 Alexis Murzeau 2023-06-27 19:39:11 UTC
Created attachment 159932 [details]
Screenrecording of copy (CTRL+C) not working when an image is in the clipboard
Comment 2 Justin Zobel 2024-09-02 12:59:12 UTC
OK so there is an option in your video which is important which is "Non-text selection: Never save in history".

So when I set history size to 1, and select the Never save in history option for Non-text selection, then this issue occurs.

Confirmed on Plasma git master.