Do not pass newline to Action::Insert
This commit is contained in:
parent
62df7291ad
commit
b59710ddc4
1 changed files with 7 additions and 2 deletions
|
|
@ -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)) => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue