Red Hat Bugzilla – Bug 77623
cut-and-paste adds extra newlines
Last modified: 2007-04-18 12:48:20 EDT
Description of Problem:
if the text i select in gnome-terminal has a space at the end of a line, cutting
and pasting it adds a newline at the end of that line, even if the text was
originally output on a single line. This breaks cutting and pasting of command
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Type 'aaaaaaaaa...' up to one character before the end of the terminal row.
2. Hit the space bar a couple of times, then add some more aaaaaaaaaa's.
3. Cut and paste this long line.
It is pasted as two lines.
It should be pasted as a single line, since it was entered as a single line.
This happens both with select/middle-click and with cut/paste from the
A customer reported a similar example today.
(So I filed it here)
'aaa bbb ccc'
in a line and select 'aaa ' (include space)
and paste. It will paste 'aaa' and a new line.
Should be fixed in Raw Hide. Please reopen if you find that this is not the case.
ynakai's testcase is fixed in Shrike, but mine is not.
vte inserts newline characters where none existed and omits them where
they did exist.
The former situation occurs when there are one or more spaces at the
end of a physical line but in the middle of a virtual line. The
latter occurs when a logical line exactly matches the length of a
Let's say I bring up a gnome-terminal with a 10-character width. I
type in the string "123456789 123456789" which will display as:
Pasting the string to another gnome-terminal will result in the string
getting broken in the middle.
Let's say I enter the string "1234567890" and then enter the string
"123456789" which will display as:
Now gnome-terminal will join the result on a cut and paste where there
should have been a newline.
This behavior is not just annoying but causes me to waste a lot of
time repairing damage. When a simple rpm --upgrade would suffice, I
find I have to carefully paste things while studying how the command
spans lines. When I'm root I like to check my commands before
executing. But with the newline-insertion behavior, I've gotten a few
surprises. Luckily I haven't lost any important data.
The former case has been fixed and the latter is filed as bug 75904
*** This bug has been marked as a duplicate of 75904 ***