https://bugs.kde.org/show_bug.cgi?id=510559

            Bug ID: 510559
           Summary: Copy/paste problems with mouse selection
    Classification: Plasma
           Product: plasmashell
      Version First 6.3.6
       Reported In:
          Platform: Debian unstable
                OS: Linux
            Status: REPORTED
          Severity: minor
          Priority: NOR
         Component: Clipboard widget & pop-up
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
  Target Milestone: 1.0

When using Konsole, I sometimes need to select text to copy and paste into
other applications. I've noticed that using the mouse selection saves the text
to the "clipboard" widget, but I often notice the unwanted "\n" being saved.

I've attached some examples:

If I run this command from Bash, I get:

----
$ echo -e "\n\nline1\nline2\nline3\n\nline4\n\nline5\n\n\n"


line1
line2
line3

line4

line5



----

Now, if I try to select lines 1 through 5 and if I'm very precise with my mouse
movements, I get the correct copy (Attachment 1). Very often, however, just
moving the mouse slightly up or down selects unwanted newlines (Attachment 2),
without being visually aware of it, since a blank line contains no text and
therefore isn't highlighted with color.

Other times, after copying, another line is automatically copied with only the
newline (Annex 3), when the intent was to copy a user name, password, or
command, for example, to paste into a web text box or another application.

This may seem harmless, but doing so selects the last copied line, thus the
newline (and not the data you were trying to copy), and this creates problems
when pasting into the application, ruining the username, password, and
everything else. Therefore, you need to check what was actually copied each
time and correct it if necessary. Otherwise, you'll have to copy and paste
again.

In my opinion, the newlines before and after the text should be removed. This
would solve the problem.

It would be even better if there was an option that trims the control codes
before and after the copied text. Anyone interested in this feature can enable
it.

Thanks,
Antonio

SOFTWARE/OS VERSIONS
Operating System: Debian GNU/Linux 13
KDE Plasma Version: 6.3.6
KDE Frameworks Version: 6.18.0
Qt Version: 6.9.2
Graphics Platform: Wayland

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to