This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours

Bug 213753

Summary: Copy&paste broken in gnome-terminal
Product: [Fedora] Fedora Reporter: Jakub Jelinek <jakub>
Component: gnome-terminalAssignee: Behdad Esfahbod <behdad>
Status: CLOSED WONTFIX QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 8CC: charlescurley, jan.kratochvil, nalin, ondrejj, triage
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard: bzcl34nup
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-01-09 02:00:08 EST Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Attachments:
Description Flags
illustration of non-reproduction none

Description Jakub Jelinek 2006-11-02 15:51:56 EST
It seems there is a big usability regressions for copy&paste in FC6 compared
to FC5 or older.
Type:
echo aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | less
(all on one line) in gnome-terminal and before hitting enter mark all the As with left mouse button and paste it into another gnome-terminal.  This works well in both FC5 and FC6, all As are pasted as one line.  But if you hit enter
and try to copy the same line ouf of less, with FC6 it will copy several lines,
each (except last) with as many As as the gnome-terminal had columns.  In FC5
this was pasted as one line only even from less (or mc etc.).
Running FC5 and FC6 gnome-terminals on the same display shows that it matters
from which terminal it is copied rather than in what terminal it is pasted.

This is quite severe for me, I often copy & paste commands e.g. from build logs,
viewing them in less, locating the right line and then copying over with mouse
into a shell prompt.  As the command lines are usually several times longer than
the width of the terminal, this bug causes lots of extra work (even far more than
I had to do on VT (where line split was caused only when the letter in last column when wrapping around contained a space).
Comment 1 Behdad Esfahbod 2006-11-02 19:03:33 EST
Well, this is a new feature in vte, showing a bug in less...
New in vte is that it keeps logical lines intact, while adds a newline where the
original stream had a newline.  This is the way it should work, and is what
xterm does too.

Now less (and more) explicity break the line even if the terminal emulator is
already doing that.

Got a report of this upstream today.  I now get it, with your description. 
Anyway, this is the upstream:

  http://bugzilla.gnome.org/show_bug.cgi?id=368106
Comment 2 Jakub Jelinek 2006-11-03 04:32:05 EST
It is not just less, it is also more, mc, vim, ...
Are you saying we need to change all apps to cope with a new vte "feature"?
Comment 3 Jan ONDREJ 2006-11-03 04:52:40 EST
mc, vim, joe was not working in older versions too. This new feature affects
only less and more. Problems are with less and more also in xterm, it is not
only a "vte feature bug".

Can it be fixed in termcap or ncurses? I think all these programs using each of
them.
Comment 4 Jakub Jelinek 2006-11-03 05:16:08 EST
mc, vim were working in FC5 just fine.
Try in FC5:
vim
i
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
and copy&paste that, it will be one line.
Similarly save that into a file, mc and hit F3, copy&paste from there.
joe for long lines doesn't wrap them in the terminal, so it isn't a thing
we are talking about here (and, emacs inserts \ at the end of the lines).
Comment 5 Behdad Esfahbod 2006-11-06 17:24:54 EST
(In reply to comment #4)
> mc, vim were working in FC5 just fine.
> Try in FC5:
> vim
> i
>
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
> and copy&paste that, it will be one line.

True.  But it will be bogus for a line of 80 "a"s followed by any other line. 
What vte is doing now (and xterm does too) is to give you the real thing.  If
the input had a CR there, you will get a newline.  Instead of insisting on
getting the old behavior one should look into how to fix it correctly with
minimal effort.

> Similarly save that into a file, mc and hit F3, copy&paste from there.
> joe for long lines doesn't wrap them in the terminal, so it isn't a thing
> we are talking about here (and, emacs inserts \ at the end of the lines).

Comment 6 Jakub Jelinek 2006-11-07 09:18:13 EST
The change to vte had to be preceeded by a reality check and not change until
at least the vast majority of applications can cope with it.
I think this should be reverted ASAP and if we manage to change at least most
commonly used apps for FC7, let's reenable it then.
Another app that is broken by this is e.g. links.
Comment 7 Jan Kratochvil 2006-12-23 09:02:33 EST
It affects also the simple reverse-search-history (C-r) in readline/bash(1),
sometimes pasting errorneous (cut) commands.
Comment 8 Matěj Cepl 2007-06-21 07:52:40 EDT
Couldn't we ask at least for some backward compatibility settings setable in
gconf? It really hurts terminal working people a lot.
Comment 9 Behdad Esfahbod 2007-06-21 15:47:58 EDT
Someone should debug and see which termcap capability controls this and get vte
to advertise the right info instead.  AFAIS the new behavior is both the more
correct, and exactly what xterm does.
Comment 10 Jakub Jelinek 2007-06-22 04:01:31 EDT
Linux console copy&paste (with gpm) works the same as FC5 gnome-terminal for
the
echo
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | less
testcase.
There are other issues with the current misbehavior:
Try say
links 'http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=245035#c2'
and try to copy&paste the ChangeLog entry (shift+left mouse button is needed
in links to select).
In FC5 gnome-terminal no line has any whitespace at the end of the lines,
in FC6+ gnome-terminal all lines have spaces at the end of the lines.
Again, that's something I have to manually remove when say pasting into
editor (joe, vim), as that's generally very undesirable.
Linux console works even here the same as FC5 gnome-terminal.
Comment 11 Behdad Esfahbod 2007-06-28 16:20:44 EDT
Jakub, I don't understand.  Are you saying that copying ChangeLog entries from
inside gnome-terminal fills the line with space?  I definitely can't reproduce
that here.  The ChangeLog entry posted at the link you pasted already has
trailing spaces. 
Comment 12 Jakub Jelinek 2007-06-28 16:58:58 EDT
Yeah, most probably introduced by this gnome-terminal bug.
So try pasting from the first comment in
links http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=240749
instead.  If links runs in FC5 gnome-terminal, it works well, in FC6+
gnome-terminal the trailing whitespace is present.
Comment 13 Bug Zapper 2008-04-04 00:22:42 EDT
Fedora apologizes that these issues have not been resolved yet. We're
sorry it's taken so long for your bug to be properly triaged and acted
on. We appreciate the time you took to report this issue and want to
make sure no important bugs slip through the cracks.

If you're currently running a version of Fedora Core between 1 and 6,
please note that Fedora no longer maintains these releases. We strongly
encourage you to upgrade to a current Fedora release. In order to
refocus our efforts as a project we are flagging all of the open bugs
for releases which are no longer maintained and closing them.
http://fedoraproject.org/wiki/LifeCycle/EOL

If this bug is still open against Fedora Core 1 through 6, thirty days
from now, it will be closed 'WONTFIX'. If you can reporduce this bug in
the latest Fedora version, please change to the respective version. If
you are unable to do this, please add a comment to this bug requesting
the change.

Thanks for your help, and we apologize again that we haven't handled
these issues to this point.

The process we are following is outlined here:
http://fedoraproject.org/wiki/BugZappers/F9CleanUp

We will be following the process here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping to ensure this
doesn't happen again.

And if you'd like to join the bug triage team to help make things
better, check out http://fedoraproject.org/wiki/BugZappers
Comment 14 Bug Zapper 2008-05-06 12:40:49 EDT
This bug is open for a Fedora version that is no longer maintained and
will not be fixed by Fedora. Therefore we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen thus bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.
Comment 15 Matěj Cepl 2008-05-06 14:33:02 EDT
Actually, Jakub, can you reproduce this with Rawhide? I cannot.
Comment 16 Matěj Cepl 2008-05-06 14:33:58 EDT
Created attachment 304673 [details]
illustration of non-reproduction
Comment 17 Matěj Cepl 2008-05-06 14:35:09 EDT
If I could, I think it would be best to move this bug to Rawhide before it is fixed.
Comment 18 Behdad Esfahbod 2008-05-08 11:27:08 EDT
I suggest the component be changed to less.

At any rate, this bug should show up upstream before anyone from g-t side would
care about it.
Comment 19 Bug Zapper 2008-11-26 02:04:22 EST
This message is a reminder that Fedora 8 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 8.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '8'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 8's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 8 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 20 Bug Zapper 2009-01-09 02:00:08 EST
Fedora 8 changed to end-of-life (EOL) status on 2009-01-07. Fedora 8 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.