Merge pull request #38 from endlesstravel/master
fix bug when input more than one character.
This commit is contained in:
commit
9d184831e2
1 changed files with 1 additions and 1 deletions
|
@ -58,7 +58,7 @@ return function(core, input, ...)
|
||||||
if char ~= "" then
|
if char ~= "" then
|
||||||
local a,b = split(input.text, input.cursor)
|
local a,b = split(input.text, input.cursor)
|
||||||
input.text = table.concat{a, char, b}
|
input.text = table.concat{a, char, b}
|
||||||
input.cursor = input.cursor + 1
|
input.cursor = input.cursor + utf8.len(char)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- text editing
|
-- text editing
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue