Skip to content

Send an in-band size report when the terminal resizes - #857

Open
devsunb wants to merge 1 commit into
dakra:mainfrom
devsunb:fix/in-band-size-report-on-resize
Open

devsunb wants to merge 1 commit into
dakra:mainfrom
devsunb:fix/in-band-size-report-on-resize

Conversation

@devsunb

@devsunb devsunb commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

A program that enables in-band size reports (mode 2048) learns its size from them and stops following SIGWINCH. Ghostty sends a report from its I/O layer whenever the terminal resizes, but libghostty-vt answers only when the mode is turned on, and ghostel never sent one on resize. Neovim enables the mode, so after a window resize it kept drawing at the size it started with, and neither :redraw! nor further resizes helped.

When a redraw commits a resize and the mode is on, write the report to the PTY after resizing it, with the same size the XTWINOPS replies use.

A program that enables in-band size reports (mode 2048) learns its size
from them and stops following SIGWINCH.  Ghostty sends a report from
its I/O layer whenever the terminal resizes, but libghostty-vt answers
only when the mode is turned on, and ghostel never sent one on resize.
Neovim enables the mode, so after a window resize it kept drawing at the
size it started with, and neither :redraw! nor further resizes helped.

When a redraw commits a resize and the mode is on, write the report to
the PTY after resizing it, with the same size the XTWINOPS replies use.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant