Bug 464789

Summary: Konsole takes more than a second to make selection available for pasting
Product: [Applications] konsole Reporter: Oded Arbel <oded>
Component: copy-pasteAssignee: Konsole Developer <konsole-devel>
Status: REPORTED ---    
Severity: normal CC: matan
Priority: NOR    
Version: master   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Oded Arbel 2023-01-25 09:43:29 UTC
SUMMARY
In Konsole, if ones double-clicks some text to select it, and then immediately middle-click to paste the selection, often the pasted text will be what was previously on the selection clipboard rather than the new text.

STEPS TO REPRODUCE
1. Open Konsole and have some text on the screen (for example, by running ls-al)
2. Select something with the mouse, wait a bit and then paste it with the middle button.
3. Select some other text by double-clicking it and then immediately middle button pasting it

OBSERVED RESULT
The first text is pasted

EXPECTED RESULT
The second text should be pasted

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
KDE Plasma Version: 5.28.80
KDE Frameworks Version: 5.103.0
Qt Version: 5.15.8

ADDITIONAL INFORMATION
I think it has something to do with klipper, as when looking at the plasma-shell logs (journalctl --user -f -u plasma-plasmashell.service), I can see the text `org.kde.klipper: Checking clip data` about the time that the old selection is replaced with the new selection - i.e. before that log line appears, middle clicking pastes the old selection and after that, it pastes the new selection.

I have not been able to reproduce this issue in Kate or in Firefox, but I can in Yakuake, so I think the problem is in the Konsole (or more korrectly, the Konsole-part?).
Comment 1 Matan Ziv-Av 2023-01-25 11:55:58 UTC
This should be fixed in https://invent.kde.org/utilities/konsole/-/merge_requests/799