Bug 365921

Summary: Occasionally, konsole silently transforms trailing spaces into carriage returns when copy-pasting => dataloss due to prematurely executing incomplete commands!
Product: [Applications] konsole Reporter: Alain Knaff <kde>
Component: copy-pasteAssignee: Konsole Developer <konsole-devel>
Status: RESOLVED WORKSFORME    
Severity: critical CC: martin.sandsmark
Priority: NOR Keywords: investigated, triaged
Version: 2.13   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Alain Knaff 2016-07-21 06:44:25 UTC
When copy-pasting from konsole, trailing spaces are occasionally transformed into carriage returns. This may lead to data loss if copy-pasting to another konsole in the process of building a command.

Example: when intending to do "cp file1 file2 directory", and copy-pasting "file1 file2" from one konsole to another after typing cp, you just lost file2 => such bugs are just inacceptable! It is due to this potential of data loss that I marked the bug as critical.

I'm aware that konsole has had trouble with trailing spaces for ages, and had a bad tendency of "fixing" issues by "compensating" them (i.e. replacing a pattern resulting from one bug with the expected pattern, thereby causing a new bug in situations where such patterns were indeed intended) => it is never a good idea to "compensate" like that, and in fixing bugs, care must be taken to actually locate and fix the *cause* rather than patch the symptoms.

(In my case, I managed to regenerate the file, but others may not be so lucky...)
Comment 1 Martin Sandsmark 2016-08-13 16:35:53 UTC
I don't really understand what you mean.

The only case I can think of is if you have run «cp file1 file2», and then select from «file1» until after «file2», which then includes a carriage return which Konsole copies appropriately. I. e. the "trailing spaces" you talk about are carriage returns.
Comment 2 Andrew Crouthamel 2018-09-19 14:28:56 UTC
This bug has had its resolution changed, but accidentally has been left in NEEDSINFO status. I am thus closing this bug and setting the status as RESOLVED to reflect the resolution change.