diff --git a/components/script/textinput.rs b/components/script/textinput.rs index 940b9919e76..9e14f9c8e6b 100644 --- a/components/script/textinput.rs +++ b/components/script/textinput.rs @@ -117,7 +117,7 @@ impl TextInput { self.edit_point.index - 1 }; let suffix_start = if forward { - let is_eol = self.edit_point.index == self.current_line_length() - 1; + let is_eol = self.edit_point.index == self.current_line_length(); if self.multiline { //TODO: handle deleting from end position of current line if is_eol {