Handle paste events in editor
Only on non-windows platforms though, since crossterm doesn't support pasting on windows.
This commit is contained in:
parent
5ad9f0f3e7
commit
f7e7003788
3 changed files with 15 additions and 2 deletions
|
|
@ -78,6 +78,7 @@ pub fn handle_editor_event(
|
|||
|
||||
// Editing
|
||||
key!(Char ch) if char_filter(*ch) => editor.insert_char(terminal.frame(), *ch),
|
||||
key!(Paste str) if str.chars().all(char_filter) => editor.insert_str(terminal.frame(), str),
|
||||
key!(Ctrl + 'h') | key!(Backspace) => editor.backspace(terminal.frame()),
|
||||
key!(Ctrl + 'd') | key!(Delete) => editor.delete(),
|
||||
key!(Ctrl + 'l') => editor.clear(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue