|
|
|
@ -15,9 +15,10 @@ pub fn keep_reading(tx_msg_in: Sender<Task>, rx_event_reader: Receiver<bool>) {
|
|
|
|
|
|
|
|
|
|
if is_paused {
|
|
|
|
|
thread::sleep(std::time::Duration::from_millis(200));
|
|
|
|
|
} else if event::poll(std::time::Duration::from_millis(50)).unwrap_or_default() {
|
|
|
|
|
} else if event::poll(std::time::Duration::from_millis(150)).unwrap_or_default() {
|
|
|
|
|
// NOTE: The poll timeout need to stay low, else spawning sub subshell
|
|
|
|
|
// and start typing immediately will cause panic.
|
|
|
|
|
// To reproduce, press `:`, then press and hold `!`.
|
|
|
|
|
match event::read() {
|
|
|
|
|
Ok(Event::Key(key)) => {
|
|
|
|
|
let key = Key::from_event(key);
|
|
|
|
|