Bug 467383

Summary: Konsole often fails to copy text to either mouse buffer or paste buffer
Product: [Applications] konsole Reporter: triffid.hunter
Component: copy-pasteAssignee: Konsole Developer <konsole-devel>
Status: REPORTED ---    
Severity: normal CC: ninjalj
Priority: NOR    
Version: 22.08.3   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description triffid.hunter 2023-03-15 08:15:55 UTC
SUMMARY

Konsole often fails to copy text to either mouse buffer or paste buffer properly.

Sometimes it works normally, sometimes I get only part of the selected text snippet, and sometimes it refuses to copy at all.

The issue is intermittent - sometimes randomly appearing and disappearing even within a single terminal if I generate more terminal output, but consistently works or fails as long as the terminal output remains unchanged.

The issue occurs both with same-line selection and multi-line.

The visual selection indicator works fine - the issue appears if I select text in konsole then try to paste it elsewhere with either ctrl+V or middle mouse.

STEPS TO REPRODUCE

1.  run konsole, generate some text on the terminal (eg cat a text file, run a program)
2.  ???
3.  select text and either middle mouse elsewhere, or ctrl+shift+c (or right click menu) to copy and ctrl+v elsewhere.

Unfortunately I haven't found a *consistent* way to reproduce the issue just yet, but I'll comment here if I do find one.

OBSERVED RESULT

Sometimes all the selected text is pasted.
Sometimes only the first part of the selected text is pasted - although the length seems pseudo-random.
Sometimes a previous selection or copy is pasted, as if konsole didn't touch the paste buffers at all.

Either way, both paste buffer and mouse buffer either end up with the same contents or are unaltered from before selecting - so it seems like the issue is with however konsole decides what text has been selected before allocating it to an appropriate buffer.

EXPECTED RESULT

Appropriate buffers are updated with the full selection, and the complete selected text can be pasted.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 6.1.19/5.26.5 ??
KDE Plasma Version: 5.26.5
KDE Frameworks Version: 5.102.0
Qt Version: 5.15.8

ADDITIONAL INFORMATION

Gentoo Linux 2.13

https://bugs.kde.org/show_bug.cgi?id=455165 seems related, however my selections aren't consistently getting broken exactly at column 81, and the issue is intermittent for me.
Comment 1 ninjalj 2023-11-14 00:44:12 UTC
Maybe a dup of https://bugs.kde.org/show_bug.cgi?id=461542?
Comment 2 ninjalj 2024-02-26 00:26:26 UTC
Ping?