Do not pass newline to Action::Insert

This commit is contained in:
Jeremy Soller 2023-10-20 13:12:26 -06:00
parent 62df7291ad
commit b59710ddc4
No known key found for this signature in database
GPG key ID: DCFCA852D3906975

View file

@ -383,7 +383,12 @@ where
_ => (), _ => (),
}, },
Event::Keyboard(KeyEvent::CharacterReceived(character)) => { Event::Keyboard(KeyEvent::CharacterReceived(character)) => {
editor.action(Action::Insert(character)); match character {
'\n' | '\r' => {}
_ => {
editor.action(Action::Insert(character));
}
}
status = Status::Captured; status = Status::Captured;
} }
Event::Mouse(MouseEvent::ButtonPressed(Button::Left)) => { Event::Mouse(MouseEvent::ButtonPressed(Button::Left)) => {