I'm sure this behavior won't change.  TAB is not a regular character, it
is a control character, just like let's say escape sequences that move
the cursor; copy-pasting doesn't include those either.  It's a bonus
that gnome-terminal tries to remember when a tab was emitted, most
terminal emulators don't do this (you always get spaces when you copy).

Tabs behave really weird when printed near the end of line.  We'd need a
special variable storing how many tabs were emitted that didn't move the
cursor.  Actually, we'd need to remember two values: there can be plenty
of tabs printed that don't advance the cursor, followed by a letter
(printed in the rightmost column, still not advancing the cursor),
followed by again many tabs.  It's just way too complicated and probably
nobody's interested in counting those tabs.

Note that when there's existing content (letters) and you move the
cursor back and emit a tab, it doesn't override those characters, it
just advances the cursor (that's the intent, a tab is a couple of "move
the cursor right" operations rather than a couple of spaces) -- what
should copy-pasting do then?  It probably just can't be made consistent.
Or, the only consistent way of handling them is always converting them
to spaces.  Consider keeping the tabs a convenience feature that
sometimes works.

There are other characters too that are lost when copying and pasting
back, e.g. starting combining accents at the beginning of a line, too
many combining accents over a character, carriage returns, form feeds,
bell, etc...

-- 
You received this bug notification because you are a member of Ubuntu
Desktop Bugs, which is subscribed to gnome-terminal in Ubuntu.
https://bugs.launchpad.net/bugs/1353354

Title:
  gnome terminal swallows tabs

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gnome-terminal/+bug/1353354/+subscriptions

-- 
desktop-bugs mailing list
desktop-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/desktop-bugs

Reply via email to