atom-community / terminal

Terminal integrated with atom-community/atom
https://atom.io/packages/atomic-terminal
Other
19 stars 4 forks source link

Copied text includes unwanted line-breaks in long texts #73

Open aminya opened 3 years ago

aminya commented 3 years ago

If the text printed to the terminal is long enough that its text is shown in the next line, and we copy the text from the terminal, the resulting copied text will have unwanted line breaks when pasted into the editor.

For example, the result of:

> echo sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss

will be copied as:

sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss 
ssssssssssssssssssssssssssssss
UziTech commented 3 years ago

I think this will have to be fixed in xterm.

aminya commented 3 years ago

Can you check if this also happens with one of the other terminal packages that you maintain?

UziTech commented 3 years ago

Yes it happens in x-terminal and terminus (the only two I tried).

This looks like a powershell/bash issue.

The problem is that the process sends the text with a newline character when it wraps so there is no way of knowing whether the newline character was supposed to be there or not.