fix indentation

This commit is contained in:
binarycat 2022-03-10 11:18:31 -05:00
parent f7947af505
commit 3d41699d8f

View File

@ -4,10 +4,10 @@ local function backspace(text)
local byteoffset = utf8.offset(text, -1) local byteoffset = utf8.offset(text, -1)
if byteoffset then if byteoffset then
-- remove the last UTF-8 character. -- remove the last UTF-8 character.
-- string.sub operates on bytes rather than UTF-8 characters, -- string.sub operates on bytes rather than UTF-8 characters,
-- so we couldn't do string.sub(text, 1, -2). -- so we couldn't do string.sub(text, 1, -2).
return string.sub(text, 1, byteoffset - 1) return string.sub(text, 1, byteoffset - 1)
end end
return "" return ""