This commit is contained in:
@@ -249,8 +249,12 @@ pub(super) fn handle_modal_input(ctx: &mut InputContext, key: KeyEvent) -> Input
|
||||
Some(state.current_dir().join(&entry.name))
|
||||
} else if entry.is_dir {
|
||||
state.enter_selected();
|
||||
state.compute_audio_counts();
|
||||
None
|
||||
} else {
|
||||
ctx.dispatch(AppCommand::SetStatus(
|
||||
"Select a directory, not a file".into(),
|
||||
));
|
||||
None
|
||||
}
|
||||
} else {
|
||||
@@ -288,15 +292,16 @@ pub(super) fn handle_modal_input(ctx: &mut InputContext, key: KeyEvent) -> Input
|
||||
}
|
||||
}
|
||||
KeyCode::Esc => ctx.dispatch(AppCommand::CloseModal),
|
||||
KeyCode::Tab => state.autocomplete(),
|
||||
KeyCode::Left => state.go_up(),
|
||||
KeyCode::Right => state.enter_selected(),
|
||||
KeyCode::Up => state.select_prev(14),
|
||||
KeyCode::Down => state.select_next(14),
|
||||
KeyCode::Backspace => state.backspace(),
|
||||
KeyCode::Tab => { state.autocomplete(); state.compute_audio_counts(); }
|
||||
KeyCode::Left => { state.go_up(); state.compute_audio_counts(); }
|
||||
KeyCode::Right => { state.enter_selected(); state.compute_audio_counts(); }
|
||||
KeyCode::Up => state.select_prev(16),
|
||||
KeyCode::Down => state.select_next(16),
|
||||
KeyCode::Backspace => { state.backspace(); state.compute_audio_counts(); }
|
||||
KeyCode::Char(c) => {
|
||||
state.input.push(c);
|
||||
state.refresh_entries();
|
||||
state.compute_audio_counts();
|
||||
}
|
||||
_ => {}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user