You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In VS Code I've noticed the behavior of Ctrl-L being different from what I was used to. Mainly compared to Gnome Terminal, but I've never really noticed terminal emulators handling this differently.
Ctrl-L or tput -x clear (or clear -x) run CSI H followed by CSI 2 J. In Gnome Terminal this results in everything that's in the current display to be scrolled out of view. In VS Code this results in everything in the current view being erased from the scrollback instead.
Details
Browser and browser version: Electron (VS Code 1.44.2)
OS version: Linux
xterm.js version: VS Code 1.44.2 (not exactly sure which xterm.js version that is)
Steps to reproduce
In a new terminal, run clear -x/tput -x clear
Scroll up.
In Gnome terminal, the line with clear -x/tput -x clear is there on the scrollback. In xterm.js, there's nothing there.
If it's not a new terminal (e.g. run seq 100 first) the last line found in the scrollback will be the last line that was out of view before the clear ran.
The text was updated successfully, but these errors were encountered:
In all of the situations described above, TERM=xterm-256color. To make sure I've also tried sending the CSI directly with echo -ne "\033[H\033[2J", yielding the same results.
In Gnome Terminal the CSI H CSI J sequence (tput -Tvt220 -x clear) appears to work identically to CSI H CSI 2 J in xterm.js, clearing everything in display, leaving any scrollback intact.
In VS Code I've noticed the behavior of
Ctrl-L
being different from what I was used to. Mainly compared to Gnome Terminal, but I've never really noticed terminal emulators handling this differently.Ctrl-L
ortput -x clear
(orclear -x
) run CSI H followed by CSI 2 J. In Gnome Terminal this results in everything that's in the current display to be scrolled out of view. In VS Code this results in everything in the current view being erased from the scrollback instead.Details
Steps to reproduce
clear -x
/tput -x clear
In Gnome terminal, the line with
clear -x
/tput -x clear
is there on the scrollback. In xterm.js, there's nothing there.If it's not a new terminal (e.g. run
seq 100
first) the last line found in the scrollback will be the last line that was out of view before the clear ran.The text was updated successfully, but these errors were encountered: