Removed duplicate Ctrl+C-Handling from term.read

The event library already takes care about that. (returning an "interrupted" event)
I noticed that because I couldn't exit command lines reliably. (The Ctrl+C-Handling in the event library replaces some events.)
This commit is contained in:
mpmxyz 2015-05-17 18:03:38 +02:00
parent 554192eeff
commit 315aa57a0c

View File

@ -357,9 +357,6 @@ function term.read(history, dobreak, hint, pwchar, filter)
history[#history] = ""
return true, nil
end
elseif keyboard.isControlDown() and code == keyboard.keys.c then
history[#history] = ""
return true, nil
elseif not keyboard.isControl(char) then
insert(unicode.char(char))
end
@ -402,6 +399,10 @@ function term.read(history, dobreak, hint, pwchar, filter)
cleanup()
error("interrupted", 0)
end
if name == "interrupted" then
cleanup()
return nil
end
local ncx, ncy = getCursor()
if ocx ~= ncx or ocy ~= ncy then
cleanup()