diff options
author | Keegan McAllister <kmcallister@mozilla.com> | 2014-11-03 17:21:18 -0800 |
---|---|---|
committer | Josh Matthews <josh@joshmatthews.net> | 2014-11-13 12:53:54 -0500 |
commit | 642a3592c7ea1b82e3a3a660370b9871aa5b5e96 (patch) | |
tree | cc8ad346f90ceae09fe30d2a14a22d47b7c1e387 /components/script/textinput.rs | |
parent | 89a27dd11a5767423535ec0610e2cb560c2bb3a3 (diff) | |
download | servo-642a3592c7ea1b82e3a3a660370b9871aa5b5e96.tar.gz servo-642a3592c7ea1b82e3a3a660370b9871aa5b5e96.zip |
Fix interfaces test
Diffstat (limited to 'components/script/textinput.rs')
-rw-r--r-- | components/script/textinput.rs | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/components/script/textinput.rs b/components/script/textinput.rs index 6dc24962aea..940b9919e76 100644 --- a/components/script/textinput.rs +++ b/components/script/textinput.rs @@ -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; } |