mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-16 10:51:55 -04:00
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:
parent
554192eeff
commit
315aa57a0c
@ -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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user