Small corrections

This commit is contained in:
2026-02-08 01:33:50 +01:00
parent af6016b9a9
commit f6e7330ad6
20 changed files with 288 additions and 49 deletions

View File

@@ -494,6 +494,19 @@ fn handle_modal_input(ctx: &mut InputContext, key: KeyEvent) -> InputResult {
return InputResult::Continue;
}
if editor.sample_finder_active() {
match key.code {
KeyCode::Esc => editor.dismiss_sample_finder(),
KeyCode::Tab | KeyCode::Enter => editor.accept_sample_finder(),
KeyCode::Backspace => editor.sample_finder_backspace(),
KeyCode::Char('n') if ctrl => editor.sample_finder_next(),
KeyCode::Char('p') if ctrl => editor.sample_finder_prev(),
KeyCode::Char(c) if !ctrl => editor.sample_finder_input(c),
_ => {}
}
return InputResult::Continue;
}
match key.code {
KeyCode::Esc => {
if editor.is_selecting() {
@@ -525,12 +538,17 @@ fn handle_modal_input(ctx: &mut InputContext, key: KeyEvent) -> InputResult {
ctx.dispatch(AppCommand::EvaluatePrelude);
}
},
KeyCode::Char('b') if ctrl => {
editor.activate_sample_finder();
}
KeyCode::Char('f') if ctrl => {
editor.activate_search();
}
KeyCode::Char('n') if ctrl => {
if editor.completion_active() {
editor.completion_next();
} else if editor.sample_finder_active() {
editor.sample_finder_next();
} else {
editor.search_next();
}
@@ -538,6 +556,8 @@ fn handle_modal_input(ctx: &mut InputContext, key: KeyEvent) -> InputResult {
KeyCode::Char('p') if ctrl => {
if editor.completion_active() {
editor.completion_prev();
} else if editor.sample_finder_active() {
editor.sample_finder_prev();
} else {
editor.search_prev();
}