Check for wakeups correctly

This commit is contained in:
Mikayla Maki 2022-11-17 11:14:31 -08:00
parent 93824dd239
commit ce0dfde8ee

View file

@ -429,17 +429,18 @@ impl TerminalBuilder {
} }
} }
if events.is_empty() { if events.is_empty() && wakeup == false {
smol::future::yield_now().await; smol::future::yield_now().await;
break 'outer; break 'outer;
} else { } else {
this.upgrade(&cx)?.update(&mut cx, |this, cx| { this.upgrade(&cx)?.update(&mut cx, |this, cx| {
for event in events {
this.process_event(&event, cx);
}
if wakeup { if wakeup {
this.process_event(&AlacTermEvent::Wakeup, cx); this.process_event(&AlacTermEvent::Wakeup, cx);
} }
for event in events {
this.process_event(&event, cx);
}
}); });
smol::future::yield_now().await; smol::future::yield_now().await;
} }