Describe the bug
When using crossterm::cursor::position() when stdin comes from another program (piped input), the program freezes and doesn't respond to any other event. When it occurs, it's impossible to quit the program by pressing Ctrl+C. The shell launching the program also get some trouble (nushell blocks, zsh get its size wrong).
The issue is not reproductible on Linux. I haven't tried on Windows yet.
To Reproduce
Minimal code :
fn main() {
let current_line_pos = crossterm::cursor::position().unwrap().1;
}
run the code with piped input :
on zsh
cargo r <<< test
on nushell
"test" | cargo r
Expected behavior
Not to freeze 😄
OS
MacOS Ventura 15.5.2
Terminal/Console
Tried on iTerm2 and vscode integrated console.
Launched with nushell and zsh.
Describe the bug When using
crossterm::cursor::position()
when stdin comes from another program (piped input), the program freezes and doesn't respond to any other event. When it occurs, it's impossible to quit the program by pressing Ctrl+C. The shell launching the program also get some trouble (nushell blocks, zsh get its size wrong).The issue is not reproductible on Linux. I haven't tried on Windows yet.
To Reproduce
on nushell
Expected behavior Not to freeze 😄
OS MacOS Ventura 15.5.2
Terminal/Console Tried on iTerm2 and vscode integrated console. Launched with nushell and zsh.