mirror of
https://git.shadowkat.net/izaya/OC-PsychOS2.git
synced 2024-11-21 11:35:44 -05:00
^C now terminates line mode input with an error
This commit is contained in:
parent
ddc2445104
commit
a533748d55
@ -307,6 +307,8 @@ function buffer:read(...)
|
||||
if #buffer > 0 and pos <= #buffer then
|
||||
buffer = buffer:sub(1, (#buffer - pos)) .. buffer:sub((#buffer - pos) + 2)
|
||||
end
|
||||
elseif char == "\3" then -- ^C, error
|
||||
error("terminated")
|
||||
elseif char == "\1" then -- ^A, go to start of line
|
||||
pos = buffer:len()+1
|
||||
elseif char == "\5" then -- ^E, go to end of line
|
||||
|
Loading…
Reference in New Issue
Block a user