1
1
mirror of https://github.com/wez/wezterm.git synced 2024-11-27 12:23:46 +03:00

termwiz: fixup key_tester example on macOS

We need to set the terminal to blocking mode when we want poll_input
to block forever, otherwise we immediately receive WouldBlock error
response and quit the program.
This commit is contained in:
Wez Furlong 2019-05-26 19:01:03 -07:00
parent 0bb3714435
commit cc0d2e5493

View File

@ -449,6 +449,12 @@ impl Terminal for UnixTerminal {
},
];
self.read.set_blocking(if wait.is_none() {
Blocking::Wait
} else {
Blocking::DoNotWait
})?;
let poll_result = unsafe {
poll(
pfd.as_mut_ptr(),