fix keys being registerd in editing modes

This commit is contained in:
krolxon 2024-05-09 12:22:27 +05:30
parent 1187e4f0b5
commit 83c86d3c2d
1 changed files with 227 additions and 225 deletions

View File

@ -15,8 +15,7 @@ pub fn handle_key_events(key_event: KeyEvent, app: &mut App) -> AppResult<()> {
pl_rename_keys::handle_pl_rename_keys(key_event, app)?;
} else if app.playlist_popup {
pl_append_keys::hande_pl_append_keys(key_event, app)?;
}
} else {
// General KeyMaps
match key_event.code {
// Quit
@ -222,7 +221,9 @@ pub fn handle_key_events(key_event: KeyEvent, app: &mut App) -> AppResult<()> {
}
// head back to previous directory
KeyCode::Char('h') | KeyCode::Left => app.browser.handle_go_back(&mut app.conn)?,
KeyCode::Char('h') | KeyCode::Left => {
app.browser.handle_go_back(&mut app.conn)?
}
// go to top of list
KeyCode::Char('g') => app.browser.selected = 0,
@ -262,5 +263,6 @@ pub fn handle_key_events(key_event: KeyEvent, app: &mut App) -> AppResult<()> {
}
}
}
}
Ok(())
}