Bug 461542 - [Mouse selection] Trim trailing spaces broken
Summary: [Mouse selection] Trim trailing spaces broken
Status: RESOLVED FIXED
Alias: None
Product: konsole
Classification: Applications
Component: copy-paste (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-11-07 10:50 UTC by dezifit
Modified: 2023-11-14 00:44 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: v23.04.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dezifit 2022-11-07 10:50:55 UTC
SUMMARY
***
Using the profile setting "trim trailing spaces" (mouse options) causes wrong/incomplete selections.
***


STEPS TO REPRODUCE
1.  Enable option to trim trailing spaces
2. Try to select text with multiple words, for example "Windows Proximity Notification.wav"
3. Pasted text shows only the first word ("Windows" in this case)

OBSERVED RESULT
Only first word is selected (copied to clipboard), everything after the first space is "trimmed"

EXPECTED RESULT
Only trailing spaces (after the last non white character) should be trimmed

SOFTWARE/OS VERSIONS
Betriebssystem: Void
KDE-Plasma-Version: 5.26.2
KDE-Frameworks-Version: 5.99.0
Qt-Version: 5.15.5
Kernel-Version: 5.19.17_1 (64-bit)
Grafik-Plattform: X11

ADDITIONAL INFORMATION
Comment 1 Bug Janitor Service 2022-11-10 00:58:06 UTC
A possibly relevant merge request was started @ https://invent.kde.org/utilities/konsole/-/merge_requests/770
Comment 2 Kurt Hindenburg 2022-11-10 16:55:10 UTC
Git commit f01fdd0a55726e60f068e72573d0323129a10eb1 by Kurt Hindenburg, on behalf of Luis Javier Merino Morán.
Committed on 10/11/2022 at 16:35.
Pushed by hindenburg into branch 'master'.

Fix trimmed selections in scrollback buffer

Commits 4e69f47b and 9046680f where using an incorrect start of buffer
when trimming trailing spaces and trailing empty cells in a line from
the scrollback buffer.  This could cause too short of a text to be
copied from the selection when there were trailing spaces in the
selection.
Related: bug 455165

M  +2    -2    src/Screen.cpp

https://invent.kde.org/utilities/konsole/commit/f01fdd0a55726e60f068e72573d0323129a10eb1