REPL.TerminalMenus.terminal no longer exists

As of the latest master
This commit is contained in:
TEC 2024-03-21 00:14:59 +08:00
parent 5f896490e9
commit d049d8aff6
Signed by: tec
SSH Key Fingerprint: SHA256:eobz41Mnm0/iYWBvWThftS0ElEs1ftBr6jamutnXc/A
1 changed files with 4 additions and 2 deletions

View File

@ -49,7 +49,9 @@ end
clearterm() = print("\e[2J")
function termcode()
REPL.Terminals.raw!(REPL.TerminalMenus.terminal, true)
term_env = get(ENV, "TERM", @static Sys.iswindows() ? "" : "dumb")
term = REPL.Terminals.TTYTerminal(term_env, stdin, stdout, stderr)
REPL.Terminals.raw!(term, true)
print("\eP+q544e\e\\")
output = @task readuntil(stdin, "\e\\")
schedule(output)
@ -61,7 +63,7 @@ function termcode()
catch
""
end
REPL.Terminals.raw!(REPL.TerminalMenus.terminal, false)
REPL.Terminals.raw!(term, false)
String(hex2bytes(last(split(value, '='))))
end