Terminals based on libvte do not reset the auto-wrap mode (DECAWM)
when they are sent a DECSTR (soft reset) sequence.
This causes strange line wrapping behavior after interfacing with
a new (and broken) curses-like stack that is starting to appear on commercial
networking equipment from multiple vendors, most critically HP Procurve
switches, which sever connections before correctly restoring terminal settings.
To test this problem, paste the following under a libvte-based terminal
emulator and under vanilla xterm:
echo -e '\e[?7l'
# now type past the end of the command line and note that text wraps to the same line.
# This is to be expected on all terms after executing the above command.
echo -e '\e[!p'
# This sent a DECSTR sequence which should restore normal autowrapping behavior so wrapping text should scroll the screen
# However, it only works on xterm, not libvte-based terminals
echo -e '\e[?7h'
# This fixed the autowrap by explicitly sending a DECAWM sequence. Both terminals should be scrolling wrapped text now.
Note that termcap, and thus the "reset" command, rely on DECSTR to execute
DECAWM as described in the file debian/xterm.ti in the ncurses-5.9 dsc, so there
is no commandline utility to undo the effect other than sending the codes by hand.
Also note that under many terminals the menu-based "reset" functions do not
clear this mode either.
This bug also effects the libvte-2.90 series of packages. I have not tested with libvte0 series.