diff --git a/modules/library/readline.lua b/modules/library/readline.lua index 7ca4433..262069a 100644 --- a/modules/library/readline.lua +++ b/modules/library/readline.lua @@ -1,4 +1,4 @@ -function readln() +function readln(rC) local s,si="",E().sI or 1 write("|") while true do @@ -10,7 +10,7 @@ function readln() elseif ev[3] == 8 then if s:len()>0 then s=s:sub(1,-2) write("\127\127|") end elseif ev[3] > 31 and ev[3] < 127 then - s=s..string.char(ev[3]) write("\127"..string.char(ev[3]).."|") + s=s..string.char(ev[3]) write("\127"..(rC or string.char(ev[3])).."|") end end C.yield()