Table of Contents

Enum SizeDetectionMode

Namespace
Terminal.Gui.Drivers
Assembly
Terminal.Gui.dll

Controls how the ANSI driver detects the terminal's window size.

public enum SizeDetectionMode

Fields

AnsiQuery = 0

Sends a CSI 18t ANSI escape-sequence query and parses the ESC [ 8 ; height ; width t response. Works over SSH or any ANSI-compatible terminal. This is the default.

Polling = 1

Uses ioctl(TIOCGWINSZ) on Unix/macOS or the Console API on Windows. Synchronous, immediate, and reliable. Useful when the ANSI query response does not reflect the remote terminal size (e.g., over an SSH tunnel).