Bring back clipboard support

This commit is contained in:
est31 2017-05-28 03:09:33 +02:00
parent 433d68955b
commit 28b854d724
7 changed files with 113 additions and 6 deletions

View file

@ -613,17 +613,17 @@ impl<T: ClipboardProvider> TextInput<T> {
self.adjust_horizontal_to_line_end(Direction::Forward, maybe_select);
KeyReaction::RedrawSelection
},
(Some('a'), _) if is_control_key(mods) => {
(_, Key::A) if is_control_key(mods) => {
self.select_all();
KeyReaction::RedrawSelection
},
(Some('c'), _) if is_control_key(mods) => {
(_, Key::C) if is_control_key(mods) => {
if let Some(text) = self.get_selection_text() {
self.clipboard_provider.set_clipboard_contents(text);
}
KeyReaction::DispatchInput
},
(Some('v'), _) if is_control_key(mods) => {
(_, Key::V) if is_control_key(mods) => {
let contents = self.clipboard_provider.clipboard_contents();
self.insert_string(contents);
KeyReaction::DispatchInput