Skip to content

Commit 134d4c9

Browse files
Add handling of Delete key for fuzzy-select
1 parent dc230eb commit 134d4c9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/prompts/fuzzy_select.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,10 @@ impl FuzzySelect<'_> {
343343
search_term.remove(byte_indices[cursor]);
344344
term.flush()?;
345345
}
346+
(Key::Del, _, _) if cursor < byte_indices.len() - 1 => {
347+
search_term.remove(byte_indices[cursor]);
348+
term.flush()?;
349+
}
346350
(Key::Char(chr), _, _) if !chr.is_ascii_control() => {
347351
search_term.insert(byte_indices[cursor], chr);
348352
cursor += 1;

0 commit comments

Comments
 (0)