inputtext: fix deleting a word by backspace swipe north

This commit is contained in:
hius07
2024-08-31 10:48:08 +03:00
committed by Frans de Jonge
parent 60e0e3ef45
commit 84ed68ba82

View File

@@ -917,6 +917,7 @@ function InputText:delWord(left_to_cursor)
return
end
local start_pos, end_pos = self:getStringPos(true, left_to_cursor)
start_pos = math.min(start_pos, end_pos)
for i = end_pos, start_pos, -1 do
table.remove(self.charlist, i)
end