mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Auto merge of #6654 - aweinstock314:add-x11-copy-to-clipboard, r=jdm
Add copy-to-clipboard feature under x11
The main work is in the the rust-clipboard library, this PR updates Cargo.lock and adds plumbing.
0337e48b3f
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6654)
<!-- Reviewable:end -->
This commit is contained in:
commit
28e163d6c4
8 changed files with 85 additions and 51 deletions
|
@ -50,14 +50,14 @@ fn test_textinput_get_sorted_selection() {
|
|||
let mut textinput = TextInput::new(Lines::Single, "abcdefg".to_owned(), DummyClipboardContext::new(""));
|
||||
textinput.adjust_horizontal(2, Selection::NotSelected);
|
||||
textinput.adjust_horizontal(2, Selection::Selected);
|
||||
let (begin, end) = textinput.get_sorted_selection();
|
||||
let (begin, end) = textinput.get_sorted_selection().unwrap();
|
||||
assert_eq!(begin.index, 2);
|
||||
assert_eq!(end.index, 4);
|
||||
|
||||
textinput.clear_selection();
|
||||
|
||||
textinput.adjust_horizontal(-2, Selection::Selected);
|
||||
let (begin, end) = textinput.get_sorted_selection();
|
||||
let (begin, end) = textinput.get_sorted_selection().unwrap();
|
||||
assert_eq!(begin.index, 2);
|
||||
assert_eq!(end.index, 4);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue