Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 77623 - cut-and-paste adds extra newlines
Summary: cut-and-paste adds extra newlines
Keywords:
Status: CLOSED DUPLICATE of bug 75904
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: vte
Version: 8.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Ray Strode [halfline]
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 79579 CambridgeTarget
TreeView+ depends on / blocked
 
Reported: 2002-11-11 05:15 UTC by Jason Merrill
Modified: 2007-04-18 16:48 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2004-11-10 20:39:46 UTC
Embargoed:


Attachments (Terms of Use)

Description Jason Merrill 2002-11-11 05:15:22 UTC
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
lines.

Version-Release number of selected component (if applicable):

2.0.1-5

How Reproducible:

always

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.

Actual Results:

It is pasted as two lines.

Expected Results:

It should be pasted as a single line, since it was entered as a single line.

Additional Information:
	
This happens both with select/middle-click and with cut/paste from the
right-click menu.

Comment 1 Nakai 2002-11-25 06:14:33 UTC
A customer reported a similar example today.
(So I filed it here)

Input
'aaa bbb ccc'
in a line and select 'aaa ' (include space)
and paste. It will paste 'aaa' and a new line.

Comment 2 Nalin Dahyabhai 2003-01-14 04:14:15 UTC
Should be fixed in Raw Hide.  Please reopen if you find that this is not the case.

Comment 3 Jason Merrill 2003-06-26 20:24:23 UTC
ynakai's testcase is fixed in Shrike, but mine is not.

Comment 4 John Gotts 2003-11-13 18:48:53 UTC
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
physical line.

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:

123456789
123456789

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:

1234567890
123456789

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.

Comment 5 Ray Strode [halfline] 2004-11-10 20:39:46 UTC
Hi,
The former case has been fixed and the latter is filed as bug 75904


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


Note You need to log in before you can comment on or make changes to this bug.