resize method
Updates the terminal dimensions.
Resizes internal tab stops and resets the scroll height. Does not implicitly clear the screen; call erase separately if needed.
Implementation
void resize(int width, int height) {
_tabs?.resize(width);
_scrollHeight = 0;
// Important: resizing MUST NOT implicitly clear the screen. Upstream UV
// keeps resize side-effect free; callers explicitly call `erase()` when
// they want a full clear (parity tests depend on this).
}