mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Auto merge of #17067 - est31:master, r=jdm
Bring back clipboard support Brings back clipboard support. --- - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #17065 - [x] These changes fix #12805 <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because _____ - [x] Testing these chances would require a full integration-style test suite, which servo currently lacks. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17067) <!-- Reviewable:end -->
This commit is contained in:
commit
12de616532
7 changed files with 113 additions and 6 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue