fixed bug when searching

This commit is contained in:
2026-02-14 08:59:33 -06:00
parent 19523a3e2b
commit 9a704cbdae
3 changed files with 10 additions and 9 deletions

BIN
here.zip

Binary file not shown.

BIN
revert.zip Normal file

Binary file not shown.

View File

@@ -255,15 +255,6 @@ fn run_app(terminal: &mut Terminal<CrosstermBackend<io::Stdout>>) -> io::Result<
} }
fn handle_key(app: &mut App, code: KeyCode) { fn handle_key(app: &mut App, code: KeyCode) {
// Normalize arrow navigation
let code = match code {
KeyCode::Right => KeyCode::Enter,
KeyCode::Left => KeyCode::Esc,
KeyCode::Char('l') => KeyCode::Enter,
KeyCode::Char('h') => KeyCode::Esc,
other => other,
};
// Special input handling in Login view // Special input handling in Login view
if matches!(app.current_view(), View::Login) { if matches!(app.current_view(), View::Login) {
match code { match code {
@@ -399,6 +390,16 @@ fn handle_key(app: &mut App, code: KeyCode) {
} }
} }
// Normalize arrow navigation
let code = match code {
KeyCode::Right => KeyCode::Enter,
KeyCode::Left => KeyCode::Esc,
KeyCode::Char('l') => KeyCode::Enter,
KeyCode::Char('h') => KeyCode::Esc,
other => other,
};
// q behavior: if not home, go home; if home, quit // q behavior: if not home, go home; if home, quit
if matches!(code, KeyCode::Char('q')) { if matches!(code, KeyCode::Char('q')) {
if !matches!(app.current_view(), View::Categories) { if !matches!(app.current_view(), View::Categories) {