feat(ansikit): add screenMain and screenAlt functions to switch terminal screen

windows-fixes
TorchedSammy 2022-03-06 14:26:20 -04:00
parent fb3cedb161
commit 764e2372a2
Signed by: sammyette
GPG Key ID: 904FC49417B44DCD
1 changed files with 9 additions and 0 deletions

View File

@ -135,6 +135,15 @@ ansikit.saveState = function()
return ansikit.printCode(7)
end
ansikit.screenMain = function()
return ansikit.printCSI('?1049', 'l')
end
ansikit.screenAlt = function()
ansikit.cursorTo(0, 0)
return ansikit.printCSI('?1049', 'h')
end
ansikit.setTitle = function(text)
return ansikit.printCode(']2;' .. text, true)
end