Bug 181988 - copy and paste introduces spaces at the end of the pasted line
Summary: copy and paste introduces spaces at the end of the pasted line
Status: RESOLVED DUPLICATE of bug 173315
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: 2.2
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-26 16:37 UTC by Richard Bos
Modified: 2009-02-07 02:36 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Bos 2009-01-26 16:37:06 UTC
Version:           2.2 (using 4.1.96 (KDE 4.1.96 (KDE 4.2 RC1)) "release 78.2", KDE:KDE4:Factory:Desktop / openSUSE_11.1)
Compiler:          gcc
OS:                Linux (i686) release 2.6.27.7-9-pae

When I copy a text in konsole, spaces are added at the end of line.   The spaces that are added are from the last character until the width of konsole.

So when I copy a text like this from konsole into a file called $tmp:
... running 08-check-permissions                                                                                                                 
... testing for modified permissions                                                                                                             
... running 09-check-packaged-twice                                                                                                              
... running 10-check-lanana                                                                                                                      
... running 11-check-pkgconfig-deps                                                                                                              
... testing devel dependencies required by pkgconfig .pc files                                                                                   
... running 12-check-libtool-deps                                                                                                                
... testing devel dependencies required by libtool .la files                                                                                     
 
It becomes this:
> sed 's/$/_THE END_/;s/  /../g' $tmp1
... running 08-check-permissions................................................................................................................_THE END_
... testing for modified permissions............................................................................................................_THE END_
... running 09-check-packaged-twice.............................................................................................................._THE END_
... running 10-check-lanana......................................................................................................................_THE END_
... running 11-check-pkgconfig-deps.............................................................................................................._THE END_
... testing devel dependencies required by pkgconfig .pc files.................................................................................._THE END_
... running 12-check-libtool-deps................................................................................................................_THE END_
... testing devel dependencies required by libtool .la files...................................................................................._THE END_

The sed command has been added to make the result visible.

The expected result is: the copied text without spaces at the end of line.

ps: the copied text does not have spaces at the end of line,  I just checked this.
Comment 1 Matthew Woehlke 2009-01-26 19:16:38 UTC
Um... I've seen this also, but can't reproduce just now.
Comment 2 Richard Bos 2009-01-26 19:50:09 UTC
> Um... I've seen this also, but can't reproduce just now.

You're right, it seems to happen with only some special files.  The one
I used is actually  a remote package build, that sents it output via
the internet to me.
Comment 3 Richard Bos 2009-01-28 23:38:47 UTC
The problem seems to happen for the lines that scroll into the buffer
(the ones that disappear out of sight on top of konsole).

So if you execute the following 1-liner:
N=0; while [[ $N -lt 30 ]]; do echo $N; N=$((N+1)); done
and your konsole is only 24 lines high, about the first 6 lines (0-5) will
have spaces added....

Below the result of the above command, with the lines copied and where I
replaced the spaces with a "." and the EOL with ___:
0........................................................................................................................____
1........................................................................................................................____
2........................................................................................................................____
3........................................................................................................................____
4........................................................................................................................____
5........................................................................................................................____
6........................................................................................................................____
7____
8____
9____
10____
11____
12____
13____

To be clear: no needs to copy the lines with the mouse and have it paste e.g.
into a file.
Comment 4 Matthew Woehlke 2009-01-29 00:27:49 UTC
Aha... you're right. I see the same; lines in scrollback (i.e. stuff that 'clear' won't nuke) show the problem.
Comment 5 Matthew Woehlke 2009-02-07 02:36:04 UTC

*** This bug has been marked as a duplicate of bug 173315 ***