^C now terminates line mode input with an error

This commit is contained in:
Izaya 2023-06-07 00:12:50 +10:00
parent ddc2445104
commit a533748d55
1 changed files with 2 additions and 0 deletions

View File

@ -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