Skip to content

Terminal size issues #2

@Euphrasiologist

Description

@Euphrasiologist

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions