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:
Michel de Graaf
2026-08-14 23:25:37 +02:00
parent 560d803b00
commit 4232a1e223
2 changed files with 22 additions and 0 deletions
+20
View File
@@ -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,
);
}
_ => {}
}
}
+2
View File
@@ -372,6 +372,8 @@ impl MainTui {
FocusedPane::Results if self.state.results_is_filtering => {
vec![
("Type", "filter"),
("↑/↓", "navigate"),
("Enter", "confirm"),
("Esc", "clear filter"),
("1-3", "focus pane"),
("q", "quit"),