Add arrow key support for folder navigation
All checks were successful
Build and Release / build-and-release (push) Successful in 54s
All checks were successful
Build and Release / build-and-release (push) Successful in 54s
Add Left/Right arrow keys as alternatives to h/l for collapsing and expanding folders in the file panel. Provides more intuitive navigation for users not familiar with vim keybindings. - Left arrow: Collapse selected folder (same as 'h') - Right arrow: Expand selected folder (same as 'l')
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "cm-player"
|
name = "cm-player"
|
||||||
version = "0.1.20"
|
version = "0.1.21"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
|||||||
@@ -626,12 +626,12 @@ async fn handle_key_event<B: ratatui::backend::Backend>(terminal: &mut Terminal<
|
|||||||
state.move_selection_down();
|
state.move_selection_down();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
(KeyCode::Char('h'), _) => {
|
(KeyCode::Char('h'), _) | (KeyCode::Left, _) => {
|
||||||
if !state.focus_playlist {
|
if !state.focus_playlist {
|
||||||
state.collapse_selected();
|
state.collapse_selected();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
(KeyCode::Char('l'), _) => {
|
(KeyCode::Char('l'), _) | (KeyCode::Right, _) => {
|
||||||
if !state.focus_playlist {
|
if !state.focus_playlist {
|
||||||
state.expand_selected();
|
state.expand_selected();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user