added support for hiding of input to readline.lua
This commit is contained in:
parent
da6bfa2370
commit
0475903e9c
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user