From f650ac1ecc9e0f530869bcc0e1269e3f60dacb04 Mon Sep 17 00:00:00 2001 From: robert00s Date: Thu, 3 Aug 2017 10:00:50 +0200 Subject: [PATCH] Fix: Backspace will delete the character before the one on the left of the cursor --- frontend/ui/widget/textboxwidget.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/frontend/ui/widget/textboxwidget.lua b/frontend/ui/widget/textboxwidget.lua index f91e4d1c8..9ad9f16f1 100644 --- a/frontend/ui/widget/textboxwidget.lua +++ b/frontend/ui/widget/textboxwidget.lua @@ -299,6 +299,8 @@ function TextBoxWidget:moveCursor(x, y) local w_prev = w - self.char_width_list[offset].width - self.char_width_list[offset].pad if x - w_prev < w - x then -- the previous one is more closer w = w_prev + else + offset = offset + 1 end end self:free()