From 2ec16a0e88d94aa83a222a3e207cfbe619824815 Mon Sep 17 00:00:00 2001 From: Emanuel Rylke Date: Sat, 6 Dec 2014 14:26:28 +0100 Subject: [PATCH] Fix bug of TextInput.adjust_vertical(1) always moving to the end of text. --- 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 6903dfc5c4a..6196a003c2f 100644 --- a/components/script/textinput.rs +++ b/components/script/textinput.rs @@ -163,7 +163,7 @@ impl TextInput { self.edit_point.index = 0; self.edit_point.line = 0; return; - } else if adjust > 0 && self.edit_point.line >= min(0, self.lines.len() - adjust as uint) { + } else if adjust > 0 && self.edit_point.line >= self.lines.len() - adjust as uint { self.edit_point.index = self.current_line_length(); self.edit_point.line = self.lines.len() - 1; return;