This service will be undergoing maintenance at 00:00 UTC, 2016-09-28. It is expected to last about 1 hours
Bug 84035 - can't correctly select wrapped lines in gnome-terminal
can't correctly select wrapped lines in gnome-terminal
Status: CLOSED DUPLICATE of bug 84429
Product: Red Hat Linux
Classification: Retired
Component: vte (Show other bugs)
8.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Ray Strode [halfline]
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-02-11 02:39 EST by Per Bothner
Modified: 2007-04-18 12:51 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-02-21 13:51:42 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Per Bothner 2003-02-11 02:39:31 EST
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
versa.

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:
Always

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 12:49:24 EST

*** This bug has been marked as a duplicate of 84429 ***
Comment 2 Red Hat Bugzilla 2006-02-21 13:51:42 EST
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.