summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/interactive/app/eventloop.rs11
-rw-r--r--src/main.rs2
2 files changed, 11 insertions, 2 deletions
diff --git a/src/interactive/app/eventloop.rs b/src/interactive/app/eventloop.rs
index d18ff44..b6c0abf 100644
--- a/src/interactive/app/eventloop.rs
+++ b/src/interactive/app/eventloop.rs
@@ -279,7 +279,7 @@ impl TerminalApp {
};
Ok(should_exit)
})?;
- let traversal = match traversal {
+ let mut traversal = match traversal {
Some(t) => t,
None => return Ok(None),
};
@@ -306,6 +306,15 @@ impl TerminalApp {
} else {
s.entries.get(0).map(|b| b.index)
};
+ // Force event processing with a key that doesn't do anything.
+ s.process_events(
+ &mut window,
+ &mut traversal,
+ &mut display,
+ terminal,
+ std::iter::once(Key::Alt('\r')),
+ )
+ .ok();
s
},
display,
diff --git a/src/main.rs b/src/main.rs
index ce2e728..a89eb46 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -44,7 +44,7 @@ fn main() -> Result<()> {
)?
.map(|(keys_rx, mut app)| {
let res = app.process_events(&mut terminal, keys_rx.into_iter());
- // Leak app memory to avoid having to wait for the hashmap to deallocate, which causes a noticable delay shortly before the the
+ // Leak app memory to avoid having to wait for the hashmap to deallocate, which causes a noticeable delay shortly before the the
// program exits anyway.
std::mem::forget(app);
res