remove current filter when executing `:parent`
Keeping the filter was often confusing and making the verb
no effective: if the current selection is the best match of the parent
for the current pattern we stay at the same place basically.
@@ -86,7 +86,15 @@ impl VerbExecutor for BrowserState {
AppStateCmdResult::Keep
}
":parent" => match &self.displayed_tree().selected_line().path.parent() {
- Some(path) => focus_path(path.to_path_buf(), screen, self.displayed_tree()),
+ Some(path) => AppStateCmdResult::from_optional_state(
+ BrowserState::new(
+ path.to_path_buf(),
+ self.displayed_tree().options.without_pattern(),
+ screen,
+ &TaskLifetime::unlimited(),
+ ),
+ Command::new(),
+ ),
None => AppStateCmdResult::DisplayError("no parent found".to_string()),
},
":print_path" => {
