Skip to main content

detect_terminal_width

Function detect_terminal_width 

Source
pub fn detect_terminal_width() -> u16
Expand description

Resolve the terminal width in cells. Prefers the OS-reported size, then the COLUMNS env var, then DEFAULT_TERMINAL_WIDTH. A set-but-invalid COLUMNS value routes through lsm_warn! so the user can correct their config; an unset COLUMNS falls through silently (the common case when stdout is piped to Claude Code).