summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorqkzk <qu3nt1n@gmail.com>2023-02-04 17:40:33 +0100
committerqkzk <qu3nt1n@gmail.com>2023-02-04 17:40:33 +0100
commitce7372c0bd327a5c8cd40afe79dcc8eae788c08a (patch)
treed6e890a1ce4c2ce9bbdfb2e69fb354c6f40b91ed
parentd9963460e26ba328956a2596c50208df9e8f0bbf (diff)
Fix: search from tree doesn't update current node
-rw-r--r--development.md1
-rw-r--r--src/event_exec.rs3
2 files changed, 3 insertions, 1 deletions
diff --git a/development.md b/development.md
index 9288e7f..7040cd3 100644
--- a/development.md
+++ b/development.md
@@ -371,6 +371,7 @@ New view: Tree ! Toggle with 't', fold with 'z'. Navigate normally.
- [x] FIX: truncate file size in preview mode.
- [x] FIX: in tree mode search is backward
- [x] FIX: when searching from tree mode, it only completes with level 1 elements, not nested ones.
+ - [x] FIX: when exiting search in tree mode, second line isn't updated
- [ ] BUG: when filtering in tree mode, only the level 1 matching elements are displayed
- [ ] Version 0.1.50 : safety & memory usage
diff --git a/src/event_exec.rs b/src/event_exec.rs
index cc4a98f..2fa9e37 100644
--- a/src/event_exec.rs
+++ b/src/event_exec.rs
@@ -1033,7 +1033,8 @@ impl EventExec {
tab.directory.tree.unselect_children();
if let Some(position) = tab.directory.tree.select_first_match(&searched) {
tab.directory.tree.position = position;
- tab.directory.tree.select_from_position()?;
+ (_, _, tab.directory.tree.current_node) =
+ tab.directory.tree.select_from_position()?;
} else {
tab.directory.tree.select_root()
};