feat(tui): navigate and confirm while filtering search results
In results filter mode, Up/Down move the selection over the filtered list and Enter confirms the filter (keeps the query, returns to normal results keys). Footer hints updated.
This commit is contained in:
@@ -285,6 +285,26 @@ impl MainTui {
|
||||
self.state.results_filter_query.pop();
|
||||
self.apply_filter();
|
||||
}
|
||||
// Confirm the filter: leave typing mode but keep the query, so
|
||||
// the normal Results keys (j/k, space, enter) act on the
|
||||
// filtered list.
|
||||
KeyCode::Enter => {
|
||||
self.state.results_is_filtering = false;
|
||||
}
|
||||
KeyCode::Up => {
|
||||
cycle(
|
||||
&mut self.state.results_table_state,
|
||||
self.state.results_filtered_items.len(),
|
||||
false,
|
||||
);
|
||||
}
|
||||
KeyCode::Down => {
|
||||
cycle(
|
||||
&mut self.state.results_table_state,
|
||||
self.state.results_filtered_items.len(),
|
||||
true,
|
||||
);
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user