From d08e44686d8b19bd9555cc99ec9068d9fde05f16 Mon Sep 17 00:00:00 2001 From: Can Celik Date: Wed, 2 Sep 2026 16:09:19 +0300 Subject: fix(client): detach when terminal geometry is unavailable (#3531) refs #3519 --- src/platform/unix_common.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/platform/unix_common.rs') diff --git a/src/platform/unix_common.rs b/src/platform/unix_common.rs index ce5bba00..a7926c22 100644 --- a/src/platform/unix_common.rs +++ b/src/platform/unix_common.rs @@ -1,5 +1,9 @@ use std::path::{Path, PathBuf}; +pub(super) fn read_terminal_grid_size() -> std::io::Result<(u16, u16)> { + crossterm::terminal::window_size().map(|size| (size.columns, size.rows)) +} + fn set_sigpipe_disposition(handler: libc::sighandler_t) { let mut action: libc::sigaction = unsafe { std::mem::zeroed() }; action.sa_sigaction = handler; -- cgit v1.2.3