-
Notifications
You must be signed in to change notification settings - Fork 85
Description
TERATERM BUG REPORT
Submit at: https://github.com/TeraTermProject/teraterm/issues/new
Title: Alternate screen buffer (DECSET 1049) and CSI 3 J not working over serial connection
Environment
- Tera Term version: 5.5.1
- Windows version: [your Windows version]
- Connection type: Serial port (USB CDC, 115200 baud)
Problem Description
The alternate screen buffer escape sequences (ESC[?1049h / ESC[?1049l) do not work when connected via serial port. Content written while in "alternate screen" mode appears in the main scroll buffer instead of a separate buffer, and exiting alternate screen mode does not restore the previous screen contents.
Additionally, the CSI 3 J (Erase Saved Lines / clear scroll buffer) sequence has no effect, even with ClearScrollBufferFromRemote=on set in TERATERM.INI.
TERATERM.INI Settings
AlternateScreenBuffer=on
ClearScrollBufferFromRemote=onSteps to Reproduce
- Connect to a device via serial port (e.g., COM3 at 115200 baud)
- Device sends:
ESC[?1049h(enter alternate screen buffer) - Device sends:
ESC[2JESC[H(clear screen, home cursor) - Device displays a full-screen application (e.g., text editor)
- User exits application
- Device sends:
ESC[?1049l(exit alternate screen buffer)
Expected Behavior
- Step 2-4: Application displays on alternate screen
- Step 6: Previous screen content (before step 2) is restored, application content disappears
Actual Behavior
- All content appears in the main scroll buffer
- Exiting alternate screen mode does not restore previous content
- Scrolling up shows remnants of the full-screen application mixed with previous output
ESC[3Jdoes not clear the scroll buffer
Additional Context
This is for an embedded Forth system (Raspberry Pi Pico) that uses VT100 escape sequences for full-screen editors. The same escape sequences work correctly in other terminal emulators (e.g., xterm, Windows Terminal).
The application sends:
- On entry:
\x1b[?1049hthen\x1b[2J\x1b[H - On exit:
\x1b[?1049l
Workaround Attempted
Tried using ESC[3J (clear scroll buffer) before and after the application, with ClearScrollBufferFromRemote=on - no effect.