parse control, ignore ^C

This commit is contained in:
Raptorox 2025-10-10 15:16:57 +02:00
parent 03131fda71
commit 9e9016d9d7
No known key found for this signature in database
GPG key ID: 8B3556FC3ED1F6D8
2 changed files with 13 additions and 0 deletions

View file

@ -44,6 +44,15 @@ fn handle_input(stdin: &mut Stdin, stdout: &mut Stdout, data: &mut Data) -> io::
let key = Key::from(buffer[0]);
match key {
Key::Ctrl('c') => {
}
Key::Ctrl('d') => {
break;
}
Key::Ctrl(_) => {
}
Key::Enter => {
data.add_to_hist(input.clone());
write!(stdout, "\r\n")?;