taught edit to insert two spaces when tab is pressed. finally.

This commit is contained in:
Florian Nücke 2014-01-20 22:49:37 +01:00
parent 1ec60b9202
commit 47396a24c8

View File

@ -299,8 +299,12 @@ local function onKeyDown(char, code)
end
elseif readonly and code == keyboard.keys.q then
running = false
elseif not keyboard.isControl(char) and not readonly then
insert(unicode.char(char))
elseif not readonly then
if not keyboard.isControl(char) then
insert(unicode.char(char))
elseif unicode.char(char) == "\t" then
insert(" ")
end
end
end