As nu_plugin is communicating over the stdout, the terminal_size crate doesn't work in its current implementation. It's ideal to use this crate as it's actively supported, and what the rest of nushell uses.
@fdncred has suggested this from discord:
fn terminal_size() -> Option<(Width, Height)> {
use windows_sys::Win32::System::Console::{GetStdHandle, STD_ERROR_HANDLE};
let handle = unsafe { GetStdHandle(STD_ERROR_HANDLE) as RawHandle };
terminal_size_using_handle(handle)
}
Or something similar. To think about!
As
nu_pluginis communicating over the stdout, theterminal_sizecrate doesn't work in its current implementation. It's ideal to use this crate as it's actively supported, and what the rest of nushell uses.@fdncred has suggested this from discord:
Or something similar. To think about!