After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 771953 - Inhibit "clear scrollback" escape sequence
Inhibit "clear scrollback" escape sequence
Status: RESOLVED OBSOLETE
Product: vte
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: VTE Maintainers
VTE Maintainers
Depends on: vteparser
Blocks:
 
 
Reported: 2016-09-25 19:14 UTC by Egmont Koblinger
Modified: 2021-06-10 15:16 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Egmont Koblinger 2016-09-25 19:14:03 UTC
Especially with infinite scrollback, I think it sucks that an escape sequence (and in turn the "clear" or "reset" commands) can simply wipe it out. Although some folks like it.

Should we perhaps introduce an API that disables the \e[3J sequence?

See also:
https://bugs.kde.org/show_bug.cgi?id=368005
https://gitlab.com/gnachman/iterm2/issues/5058
Comment 1 Christian Persch 2016-09-25 20:39:33 UTC
See https://bugzilla.redhat.com/show_bug.cgi?id=815790 for some small values of 'why' this was introduced. Personally I agree that a simple clear shouldn't clear the scrollback buffer, so shouldn't use E3. Either this should be taken up with the ncurses maintainer, or we should disable CSI 3J by default, and expose clearing the scrollback in the API so that we can bind it to some menu item in g-t.
Comment 2 Egmont Koblinger 2016-09-25 21:02:23 UTC
So, apparently this originates from the Linux console to overcome this terrible hack:

"[...] it then changes the foreground virtual terminal to another
terminal and then back to the original terminal."

Also it makes sense there because:

- the terminal is not closed when the user logs out (which is a privacy concern that does not exist at graphical terminals);

- the scrollback is quite small anyways so there's not much to lose.


There's much less point for this in graphical terminals because:

- it's automatically wiped out when you log out;

- the scrollback can contain tons of precious data which you wouldn't want to see getting wiped out during normal operation;

- this feature can easily be invoked from a menu entry or even a hotkey;

- it's usually a cheap operation to close the terminal and open a new one instead.
Comment 3 Egmont Koblinger 2017-09-01 20:09:19 UTC
See also https://bugs.kde.org/show_bug.cgi?id=384218.
Comment 4 GNOME Infrastructure Team 2021-06-10 15:16:16 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/vte/-/issues/2342.