mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Fix interfaces test
This commit is contained in:
parent
89a27dd11a
commit
642a3592c7
7 changed files with 169 additions and 138 deletions
|
@ -106,9 +106,11 @@ impl TextInput {
|
|||
let prefix_end = if forward {
|
||||
self.edit_point.index
|
||||
} else {
|
||||
//TODO: handle backspacing from position 0 of current line
|
||||
if self.multiline {
|
||||
assert!(self.edit_point.index > 0);
|
||||
//TODO: handle backspacing from position 0 of current line
|
||||
if self.edit_point.index == 0 {
|
||||
return;
|
||||
}
|
||||
} else if self.edit_point.index == 0 {
|
||||
return;
|
||||
}
|
||||
|
@ -118,7 +120,9 @@ impl TextInput {
|
|||
let is_eol = self.edit_point.index == self.current_line_length() - 1;
|
||||
if self.multiline {
|
||||
//TODO: handle deleting from end position of current line
|
||||
assert!(!is_eol);
|
||||
if is_eol {
|
||||
return;
|
||||
}
|
||||
} else if is_eol {
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue