enableWindowResizeEvents
Write ResizeEvents into events using platform-specific window monitoring.
Note: Before enabling this, consider querying the terminal for support of mode 2048 in-band resize events which are more reliable. Mode 2048 events are also parsed and sent as ResizeEvents.
On Windows this enables receiving WINDOW_BUFFER_SIZE_RECORD
records from the console. Only the row and column values of the ResizeEvent will be present. The width and height will always be 0.
On Linux and macOS this installs a SIGWINCH
signal handler which then queries TIOCGWINSZ
using ioctl
.
Note: You can also respond to ResizeEvents which lack necessary data by sending XTWINOPS
to query row/col counts and/or window or cell size in pixels. More details here.