Skip to content

Commit

Permalink
Add handling of Delete key for fuzzy-select
Browse files Browse the repository at this point in the history
  • Loading branch information
stormshield-kg committed Sep 11, 2023
1 parent dc230eb commit 134d4c9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/prompts/fuzzy_select.rs
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,10 @@ impl FuzzySelect<'_> {
search_term.remove(byte_indices[cursor]);
term.flush()?;
}
(Key::Del, _, _) if cursor < byte_indices.len() - 1 => {
search_term.remove(byte_indices[cursor]);
term.flush()?;
}
(Key::Char(chr), _, _) if !chr.is_ascii_control() => {
search_term.insert(byte_indices[cursor], chr);
cursor += 1;
Expand Down

0 comments on commit 134d4c9

Please sign in to comment.