aboutsummaryrefslogtreecommitdiff
path: root/stand/lua/color.lua
diff options
context:
space:
mode:
authorKyle Evans <kevans@FreeBSD.org>2018-06-12 03:44:34 +0000
committerKyle Evans <kevans@FreeBSD.org>2018-06-12 03:44:34 +0000
commit5d2791646b0161659f2fc2e4e2909c996ca0ffdb (patch)
tree777d3061336f1bba6d075f00f29c862fde5e8591 /stand/lua/color.lua
parent22e6ecf367bb9f2dbfba2c662ad09467322a54de (diff)
downloadsrc-5d2791646b0161659f2fc2e4e2909c996ca0ffdb.tar.gz
src-5d2791646b0161659f2fc2e4e2909c996ca0ffdb.zip
lualoader: More black-on-white fixes
To recap the problem: with a black-on-white xterm, the menu draws terribly. Ideally, we would try our best for a white-on-black context for the menu since graphics and whatnot might not be tested for other setups and there's no reasonable way to sample the terminal at this point for the used color scheme. This commit attempts to address that further in two ways: - Instead of issuing CSI bg/fg resets (CSI 39m and CSI 49m respectively for "default"), issue CSI bg/fg escape sequences for our expected color scheme - Reset to *our* default color scheme before we even attempt to load the local module, so that we personally don't have any earlier text with the console default color scheme. Reported by: emaste (again)
Notes
Notes: svn path=/head/; revision=334986
Diffstat (limited to 'stand/lua/color.lua')
-rw-r--r--stand/lua/color.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/stand/lua/color.lua b/stand/lua/color.lua
index 0e51908aebbb..994e7cb1edcb 100644
--- a/stand/lua/color.lua
+++ b/stand/lua/color.lua
@@ -69,7 +69,7 @@ function color.resetfg()
if color.disabled then
return ''
end
- return core.KEYSTR_CSI .. "39m"
+ return color.escapefg(color.WHITE)
end
function color.escapebg(color_value)
@@ -83,7 +83,7 @@ function color.resetbg()
if color.disabled then
return ''
end
- return core.KEYSTR_CSI .. "49m"
+ return color.escapebg(color.BLACK)
end
function color.escape(fg_color, bg_color, attribute)