pub fn get_terminal_size() -> usize {
    const DEFAULT_TERMINAL_SIZE: usize = 80;
    #[cfg(not(test))]
    match crossterm::terminal::size() {
        Ok((terminal_size, _)) => terminal_size as usize,
        Err(_) => {
            use std::sync::Once;

            static WARN_ONCE: Once = Once::new();
            WARN_ONCE.call_once(|| {
                log::warn!("Unable to get terminal size. Using default: {DEFAULT_TERMINAL_SIZE}");
            });

            DEFAULT_TERMINAL_SIZE
        }
    }
    #[cfg(test)]
    DEFAULT_TERMINAL_SIZE
}
Terminal size in characters.

Returns `80usize` for tests and in case the terminal size can not be
retrieved.
src/suggestion.rs