Skip to content

Text reflow on resize

Category: extensions · Tags: Xterm Extensions · Specification ↗

Text reflow determines what happens to scrollback content when the terminal window is resized. With reflow, long lines that were soft-wrapped at the old width re-wrap at the new width — widening the terminal unwraps them back into single lines. Without reflow, each wrapped line becomes a separate hard line, and widening the terminal leaves gaps. Reflow requires the terminal to track which line breaks are "soft" (caused by reaching the terminal width) versus "hard" (caused by an explicit newline). This distinction is maintained per-line in the scrollback buffer. Most modern terminals support reflow, but the behavior differs for content inside scroll regions, content with certain SGR attributes, and content generated by full-screen applications. The alternate screen buffer typically does not reflow, since TUI applications manage their own layout.

Supported by 5 of 6 backends (83%)

Support Matrix

BackendVersionSupportNotes
Alacritty0.26.0✓ yes
Ghostty1.3.1✓ yes
Kitty0.40.0✓ yes
WezTerm0.1.0-fork.5✓ yes
xterm.js5.5.0✓ yes
vt1000.1.0✗ noNot implemented — pure TypeScript emulator

Powered by Termless
Playwright for Terminals