diff options
Diffstat (limited to 'src/platform/unix_common.rs')
| -rw-r--r-- | src/platform/unix_common.rs | 4 |
1 files changed, 4 insertions, 0 deletions
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; |
