fix(tui): allow navigating filtered results after searching

enter now confirms the search and returns focus to the list so items
can be selected, toggled, etc. pressing / returns to the search bar
with the query intact, esc clears it.
This commit is contained in:
objz committed 2026-04-25 12:40:42 +02:00
1 parent 7c1de45a2a
commit aa19e5bde1
6 files changed
+32

No files matched your search

+5
View File
@@ -168,6 +168,11 @@ impl WidgetKey for State {
fn handle_key(&mut self, key_event: &crossterm::event::KeyEvent) {
if self.search.active {
match key_event.code {
KeyCode::Enter => {
self.search.confirm();
self.list_state.selected = Some(0);
self.update_scrollbar();
}
KeyCode::Esc => {
self.search.deactivate();
self.list_state.selected = Some(0);