mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Fixed bug in textinput::adjust_vertical concerning selection_origin update
This bug was discovered using the F* formal verification framework. Style changes (match -> if let) Replace if let Some(_) by .is_some()
This commit is contained in:
parent
9ca6768a56
commit
e1ea8fbd35
2 changed files with 26 additions and 1 deletions
|
@ -318,6 +318,10 @@ fn test_textinput_adjust_vertical() {
|
|||
textinput.adjust_vertical(2, Selection::NotSelected);
|
||||
assert_eq!(textinput.edit_point().line, 2);
|
||||
assert_eq!(textinput.edit_point().index, 1);
|
||||
|
||||
textinput.adjust_vertical(-1, Selection::Selected);
|
||||
assert_eq!(textinput.edit_point().line, 1);
|
||||
assert_eq!(textinput.edit_point().index, 1);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue