Bug 464789 - Konsole takes more than a second to make selection available for pasting
Summary: Konsole takes more than a second to make selection available for pasting
Status: REPORTED
Alias: None
Product: konsole
Classification: Applications
Component: copy-paste (show other bugs)
Version: master
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-01-25 09:43 UTC by Oded Arbel
Modified: 2023-01-25 11:55 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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