diff options
author | Sebastian Thiel <sebastian.thiel@icloud.com> | 2020-03-30 01:00:58 +0800 |
---|---|---|
committer | Sebastian Thiel <sebastian.thiel@icloud.com> | 2020-03-30 01:00:58 +0800 |
commit | 8b3a32f9d99a26ac62e150ae6a2cb5fa835a8055 (patch) | |
tree | 5f9922e1f931acc2a3a99cb40f38b79f44098a6e /src | |
parent | fc0b814eab5d4157b3c09b34957c8a68e39d46d3 (diff) |
Update currently visible entries whenever we get the chance during scanning
Otherwise entries appear stale
Diffstat (limited to 'src')
-rw-r--r-- | src/interactive/app/eventloop.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/interactive/app/eventloop.rs b/src/interactive/app/eventloop.rs index 9e93102..d97a170 100644 --- a/src/interactive/app/eventloop.rs +++ b/src/interactive/app/eventloop.rs @@ -215,10 +215,13 @@ impl TerminalApp { keys }; - let mut state = None; + let mut state = None::<AppState>; let traversal = Traversal::from_walk(options, input, |traversal| { let s = match state.as_mut() { - Some(s) => s, + Some(s) => { + s.entries = sorted_entries(&traversal.tree, s.root, s.sorting); + s + } None => { state = Some({ let sorting = Default::default(); |