Bug 84035 - can't correctly select wrapped lines in gnome-terminal
Summary: can't correctly select wrapped lines in gnome-terminal
Status: CLOSED DUPLICATE of bug 84429
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: vte
Version: 8.0
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Ray Strode [halfline]
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2003-02-11 07:39 UTC by Per Bothner
Modified: 2007-04-18 16:51 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2006-02-21 18:51:42 UTC

Attachments (Terms of Use)

Description Per Bothner 2003-02-11 07:39:31 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3a) Gecko/20021212

Description of problem:
(This bug is also in Phoebe 8.0.93.)

If a program (like make, say) writes long lines to
a gnome-terminal, you cannot reliably select such
lines and paste them.  It uses the *visual* appearance
of the terminal where a line ends:  If the last
character on the line is a space, then it assumes
the selection should contain a newline, and vice

This is wrong: gnome-terminal needs to *remember*
for each line whether a cr-nl was emitted or whether
the line overflowed.  Xterm gets this right, at least
most of the time.  (I also got this right in my Emacs
terminal emulator by being careful when I inserted a
newline in the buffer.)

The result is very annoying and unreliable cut-and-paste.

Note that gnome-terminal (like xterm and vt100) has the
termcap 'xn' capability, so you need special handling
at the end of the line anyway.  All you need to do is
maintain a bit for each line whether the line overflowed,
and update when inserting/deleting lines or scrolling.

Ideally, this flag bit should also be used when re-sizing
the terminal, re-breaking long lines.

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

How reproducible:

Steps to Reproduce:
Run 'cat' in gmome-terminal.  Type a line longer than the window
width, making sure the last column on the line is a space.
Now copy this line into an emacs window (useful to
clearly see where the newlines are).
Note how the one line gets split into two.

Next try type a line the width of the window.  End the
line with non-spaces (i.e. the last column is not a space).
Then hit enter just before the line wraps, and then type
some more on the next line.  Then select these two lines,
and paste them into emacs.  Notice how the two lines are
now one long wrapped-around line in emacs.

Actual Results:  See description.

Expected Results:  See description.

Additional info:

One can argue whether the serverity is normal or low,
but it is one of the things in RH 8.0 that has most
annoyed me day-to-day.

Note that bug 74611 is related, but different.
The fix for bug 74611 does not handle long lines.

Comment 1 Ray Strode [halfline] 2004-11-09 17:49:24 UTC

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

Comment 2 Red Hat Bugzilla 2006-02-21 18:51:42 UTC
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.

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