Bug 493576 - clipboard "Keep the selection and clipboard the same" is not working as expected
Summary: clipboard "Keep the selection and clipboard the same" is not working as expe...
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Clipboard widget & pop-up (other bugs)
Version First Reported In: 5.27.11
Platform: Kubuntu Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-09-24 10:52 UTC by ilkerk
Modified: 2024-11-27 21:06 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 6.2.3
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ilkerk 2024-09-24 10:52:57 UTC
SUMMARY
In clipboard configuration "Keep the selection and clipboard the same" is not working as expected.

STEPS TO REPRODUCE
1.  In a wayland session (on Plasma 5.27), open configure clipboard, check "Keep the selection and clipboard the same" and also for the history behaviour check "Text selection: Only when explicitly copied"
2.  Now select any text (donot copy). Then paste the text using "Ctrl-V" or "Paste" action

OBSERVED RESULT
At step 2, it pastes the main clipboard which is kept separate from the selection clipboard


EXPECTED RESULT
At step 2, it should paste the selected text because we enabled "Keep the selection and clipboard the same"
Two notes: 
1- It works as expected if you also enable "Text selection: Always save in history"
2- I only tested in Wayland maybe it works on xorg as expected


SOFTWARE/OS VERSIONS
Windows: 
macOS: 
(available in the Info Center app, or by running `kinfo` in a terminal window)
Linux/KDE Plasma:  Kubuntu 24.04
KDE Plasma Version:  5.27 Wayland
KDE Frameworks Version:  
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 s.cimerman 2024-11-26 15:29:32 UTC
Can confirm the same behavior on my system. After upgrade from F39 to F40 (and now F41) I have problems with copy pasting. It looks to me that the settings are ignored, but can't point my finger at what exactly is going wrong.
Comment 2 TraceyC 2024-11-26 18:11:10 UTC
I can't reproduce this on git-master 
I an reproduce on a fresh install of Kubuntu 24.04, updated
Comment 3 TraceyC 2024-11-26 20:51:15 UTC
I've gotten information that unfortunately, the fix for this is not going to be backported to Plasma 5.27 due to large differences in the code bases. You'll have to use the workaround for now.

For Fedora, and other distros with Plasma 6, I've confirmed this is working as expected with 6.2.3. If you experience this specific bug (using the same steps as the original post) with 6.2.3 or greater, please feel free to re-open this issue.
Comment 4 s.cimerman 2024-11-27 14:47:23 UTC
6.2.3 is also problematic.
And I just figured the problem: even when I select the 'Text selection: Only when explicitly copied' is copies all the time.
Super problematic. And want to make a URL link in the Word/Slack, where I first must select the text to paste the pre-copied URL ... and it copies instead the selected text :D
Comment 5 TraceyC 2024-11-27 21:06:32 UTC
(In reply to s.cimerman from comment #4)
> 6.2.3 is also problematic.
> And I just figured the problem: even when I select the 'Text selection: Only
> when explicitly copied' is copies all the time.
> Super problematic. And want to make a URL link in the Word/Slack, where I
> first must select the text to paste the pre-copied URL ... and it copies
> instead the selected text :D

I'm also unable to replicate this on git-master, which will be released as 6.3.0
If you see any further bugs like this with Plasma 6.3.0, please open a new bug report. Thanks!