Bug 355841

Summary: Unpredictable what actually will be pasted due to copy-only-selection item not being visually differentiated in any way
Product: [Plasma] plasmashell Reporter: arne anka <kde-bugs>
Component: Clipboard widget & pop-upAssignee: Plasma Bugs List <plasma-bugs-null>
Status: CONFIRMED ---    
Severity: normal CC: BM-2cTv4XtvC9UQ8TdFCfPNySv2omc8T6m3sv, bshah, dejanm, nate, plasma-bugs-null, tomashnyk, travneff
Priority: NOR Keywords: usability
Version First Reported In: 5.15.3   
Target Milestone: 1.0   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: screenshot illustrating scenario described in report

Description arne anka 2015-11-24 14:02:40 UTC
very often it is impossible to predict which of the stored entries  actually will be inserted when pasting.
see attached screenshot of the clipboards contents:
what entry would you expect to be imported upon clicking the middle mouse button?

it's actually the second one. to get the first one, i have to select the second one, see it move to top (when, curiously enough, it would be inserted as well). then i have to click the now second entry (formerly the top one), see it move to top again -- and only then it would be inserted as expected.

this issue persist since klipper in kde 4.x at least and makes the clipboard of limited use.


Reproducible: Always
Comment 1 arne anka 2015-11-24 14:03:35 UTC
Created attachment 95697 [details]
screenshot illustrating scenario described in report
Comment 2 Martin Flöser 2015-12-04 07:28:46 UTC
Did you try to use option "Synchronize contents of the clipboard and the selection"?

The clipboard (ctrl+c/ctrl+v) is separate from the selection (middle click paste) by default on X11. This has nothing to do with klipper, but with how X11 works. Klipper provides with the config option a mean to synchronize them.
Comment 3 arne anka 2015-12-13 20:21:03 UTC
i did, but the results puzzled me even more.

but in this particular instance, the entries were created entirely by simply selecting a bit of text.
Comment 4 gnastyle 2016-04-04 21:44:44 UTC
I can reproduce the issue on Chakra since the beginning of plasma 5.
The string you Copy or Ctrl+C should always be at first place.

That option is very dangerous, since you don't need to do Ctrl+C or Copy to copy a text.
If you select a text for error, then what did you copy is vanished.
Comment 5 arne anka 2020-06-10 08:47:43 UTC
this bug is almost 4 years old!

Any chance this extremely annoying and basic bug will ever be fixed? 
It basically renders the clipboard useless in a lot of situations.
To check the entries, de-/reselect the entry and the hoping it works is more work than simply copying by strc+c or context menu and afterwards pasting.
Comment 6 Nate Graham 2021-04-01 21:11:20 UTC
*** Bug 97913 has been marked as a duplicate of this bug. ***
Comment 7 tomashnyk 2025-08-02 11:49:41 UTC
A simple solution would be to for example have the text that was selected (primary) bold. Or italics. Or highlighted...
Comment 8 arne anka 2025-08-08 10:04:04 UTC
(In reply to tomashnyk from comment #7)
> A simple solution would be to for example have the text that was selected
> (primary) bold. Or italics. Or highlighted...

Wouldn't change the fact that you never will know what actually will be inserted _without_ checking the contents first.
And then klipboard will be completely useless - I'm better of with an editor where I keep my snippets.
Comment 9 tomashnyk 2025-08-08 22:53:58 UTC
(In reply to arne anka from comment #8)
> Wouldn't change the fact that you never will know what actually will be
> inserted _without_ checking the contents first.
> And then klipboard will be completely useless - I'm better of with an editor
> where I keep my snippets.

There seems to be a misunderstanding:
1) You middle click - the bold/hihglighred entry is pasted, wherever it is.
2)You paste with CTRL+C - the topmost entry is pasted, even if it is bold.

What would not be clear?

The only problem is when the bold/primsry entry is too low.
Comment 10 arne anka 2025-08-13 11:32:09 UTC
(In reply to tomashnyk from comment #9)
> (In reply to arne anka from comment #8)
> > Wouldn't change the fact that you never will know what actually will be
> > inserted _without_ checking the contents first.
> > And then klipboard will be completely useless - I'm better of with an editor
> > where I keep my snippets.
> 
> There seems to be a misunderstanding:
> 1) You middle click - the bold/hihglighred entry is pasted, wherever it is.
> 2)You paste with CTRL+C - the topmost entry is pasted, even if it is bold.
> 
> What would not be clear?
> 
> The only problem is when the bold/primsry entry is too low.

Given that klipboard seemingly has no idea _what_ was selected in what order in the first place, the highlighting would be as random as the current order/insertion logic is.
Secondly, how would that work? I open klipboard's list, check what is highlighted/top most, correct it if necessary (and it will be necessary) and only then middle click or CTRL+V? That's basically an acknowldgment that klipboard is little more than a randomly ordered list of entries, but more cumbersome to use than a post-it.
Comment 11 tomashnyk 2025-08-13 18:02:57 UTC
What is your clipboard setting (screenshot would be welcome)

In my suggestion, I was wrong - what is in the clipboard filled with CTRL+C should be bolded - that is what will be pasted after pressing CTRL+V. For me, what is going to be inserted after clicking the middle button is always top of the list. Because to get anything into clipboard, I first have to select it.