From da296e2e95eef398942adfd4ec70799813b958a2 Mon Sep 17 00:00:00 2001 From: Tigran Aivazian Date: Fri, 14 Sep 2012 18:10:21 +0100 Subject: [PATCH] Slight cleanup of the previous commit: save one arithmetical operation. --- inputbox.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inputbox.lua b/inputbox.lua index 1ddf5390e..ae0150e1e 100644 --- a/inputbox.lua +++ b/inputbox.lua @@ -612,7 +612,7 @@ function InputBox:ModeDependentCommands() table.insert(self.charlist, string.sub(r,i,i)) end self.charpos = #self.charlist + 1 - self.input_cur_x = self.input_start_x + (self.charpos-1)*self.fwidth + self.input_cur_x = self.input_start_x + #self.charlist * self.fwidth self.input_string = r self:refreshText() self.cursor:moveHorizontal(#self.charlist*self.fwidth)