fix bug when input more than one character.

This commit is contained in:
endlesstravel 2016-06-01 19:06:45 +08:00
parent 3fd6a6aecd
commit 3171286c1f

View file

@ -58,7 +58,7 @@ return function(core, input, ...)
if char ~= "" then
local a,b = split(input.text, input.cursor)
input.text = table.concat{a, char, b}
input.cursor = input.cursor + 1
input.cursor = input.cursor + utf8.len(char)
end
-- text editing