Index: stand/forth/loader.4th =================================================================== --- stand/forth/loader.4th +++ stand/forth/loader.4th @@ -72,6 +72,12 @@ only forth definitions +: maybe-resetcons ( -- ) + loader_color? if + ris + then +; + : bootmsg ( -- ) loader_color? dup ( -- bool bool ) if 7 fg 4 bg then Index: stand/forth/loader.rc =================================================================== --- stand/forth/loader.rc +++ stand/forth/loader.rc @@ -14,6 +14,7 @@ start maybe-efi-resizecons +maybe-resetcons \ Tests for password -- executes autoboot first if a password was defined check-password Index: stand/forth/screen.4th =================================================================== --- stand/forth/screen.4th +++ stand/forth/screen.4th @@ -39,6 +39,9 @@ \ clear screen : clear ( -- ) ho cld ; +\ reset to initial state +: ris ( -- ) escc [char] c emit ; + \ move cursor to x rows, y cols (1-based coords) ( Esc-[%d;%dH ) : at-xy ( x y -- ) escc .# [char] ; emit .# [char] H emit ; Index: stand/lua/core.lua =================================================================== --- stand/lua/core.lua +++ stand/lua/core.lua @@ -87,6 +87,7 @@ -- other contexts (outside of Lua) may mean 'octal' core.KEYSTR_ESCAPE = "\027" core.KEYSTR_CSI = core.KEYSTR_ESCAPE .. "[" +core.KEYSTR_RESET = core.KEYSTR_ESCAPE .. "c" core.MENU_RETURN = "return" core.MENU_ENTRY = "entry" Index: stand/lua/loader.lua =================================================================== --- stand/lua/loader.lua +++ stand/lua/loader.lua @@ -45,10 +45,10 @@ try_include("local") config.load() --- Our console may have been setup for a different color scheme before we get --- here, so make sure we set the default. +-- Our console may have been setup with different settings before we get +-- here, so make sure we reset everything back to default. if color.isEnabled() then - printc(color.default()) + printc(core.KEYSTR_RESET) end if not core.isMenuSkipped() then menu = require("menu")