! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
copy color when copying text
Status:
RESOLVED: WONTFIX
Product:
Xfce4-terminal
Component:
General

Comments

Description akostadinov 2015-09-28 15:48:01 CEST
Hello, very often one needs to share terminal output with copy/paste. The issue is that color data is lost and text becomes hardly readable.

Can we have one of the following:
* when copying text, copy it like other programs - firefox, libre office, etc where color is preserved
* if the above not feasible, can we at least copy ASCII color codes along with the text so one can later process that as needed

P.S. from windows users I read copy/paste with color is working with some terminals there, so I'm trilled they managed to do at least one thing better than in linux
Comment 1 Egmont Koblinger 2016-06-19 10:03:13 CEST
Newest vte copies the colors. (I don't know when it was implemented.)
Comment 2 Igor editbugs 2016-06-19 16:31:54 CEST
How (where) can you paste colored text?
Comment 3 Egmont Koblinger 2016-06-19 19:03:20 CEST
I pasted to LibreOffice Writer.
Comment 4 Egmont Koblinger 2016-06-19 19:30:28 CEST
Pasting to gmail's composer also works (tried with Firefox, presumably works with all decent browsers).
Comment 5 Igor editbugs 2016-06-19 19:38:49 CEST
Doesn't work for me... Neither it works when pasting from gnome-terminal.

$ echo $TERM
xterm-256color
$ vte-2.91 --version
Simple VTE Test Application 0.44.2
Comment 6 Egmont Koblinger 2016-06-19 19:40:07 CEST
I'm using gnome-terminal and vte from git master. Maybe it's a new feature in master (future 0.46)?
Comment 7 Egmont Koblinger 2016-06-19 20:02:41 CEST
Haha, seems this is an experimental feature only enabled in development releases.

vte/src/vteinternal.hh:

/* Until the selection can be generated on demand, let's not enable this on stable */
#include "vte/vteversion.h"
#if (VTE_MINOR_VERSION % 2) == 0
#undef HTML_SELECTION
#else
#define HTML_SELECTION
#endif
Comment 8 Igor editbugs 2016-06-19 20:04:04 CEST
Ok, this makes sense.
Anyway, this is not the terminal's responsibility, and I think the issue may be resolved, right?
Comment 9 Egmont Koblinger 2016-06-19 20:08:33 CEST
Well, assuming users will use stable vte versions, OP's request is not fulfilled. However it's not missing from xfce-terminal per se, it should be implemented in vte. Until then, OP could just make a trivial one-liner change in vte and recompile for himself (sure it's not ideal).

I don't know anything about the plans of making this the default vte behavior.
Comment 10 Igor editbugs 2016-06-19 20:11:54 CEST
Correct. What I mean is that we are not going to implement this within xfce4-terminal as this should be part of vte, and they may have their own reasons for not including this functionality into stable versions.

Resolution: You need to use developer's version of vte to get this functionality, as Egmont mentioned.

Bug #12229

Reported by:
akostadinov
Reported on: 2015-09-28
Last modified on: 2016-06-19

People

Assignee:
Nick Schermer
CC List:
2 users

Version

Version:
unspecified

Attachments

Additional information