Skip to content

Commit

Permalink
Update currently visible entries whenever we get the chance during sc…
Browse files Browse the repository at this point in the history
…anning

Otherwise entries appear stale
  • Loading branch information
Byron committed Mar 29, 2020
1 parent fc0b814 commit 8b3a32f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/interactive/app/eventloop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 8b3a32f

Please sign in to comment.