From 9c26cf7ea998638c69848e73106e342811ec8c59 Mon Sep 17 00:00:00 2001 From: Rohan Prinja Date: Fri, 5 Dec 2014 17:06:34 +0530 Subject: [PATCH] allow deleting last char --- components/script/textinput.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 {