diff options
author | Sebastian Thiel <sebastian.thiel@icloud.com> | 2021-02-15 16:43:39 +0800 |
---|---|---|
committer | Sebastian Thiel <sebastian.thiel@icloud.com> | 2021-02-15 16:43:39 +0800 |
commit | ee7369022611745ec9c55beddf1b907f13ed3559 (patch) | |
tree | c6cbceafd18bd35e7f2646ac90db996df58cd370 /src/interactive | |
parent | 6d7b3cd062214f2cc66886d49d1a60406204abf3 (diff) |
Enforce drawing once after traversal is done
Otherwise some 'scanning' message is likely to remain if there is no
additional user input.
Diffstat (limited to 'src/interactive')
-rw-r--r-- | src/interactive/app/eventloop.rs | 11 |
1 files changed, 10 insertions, 1 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, |