1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-11-30 08:19:09 +00:00

loader_lua: lua color changes should end with reset

The color change should have reset sequence, not switch to white.
This commit is contained in:
Toomas Soome 2019-09-22 17:39:20 +00:00
parent 2de5a21edc
commit 6dd078df19
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=352601
4 changed files with 8 additions and 8 deletions

View File

@ -42,7 +42,7 @@ color.MAGENTA = 5
color.CYAN = 6
color.WHITE = 7
color.DEFAULT = 0
color.DEFAULT = 9
color.BRIGHT = 1
color.DIM = 2
@ -67,7 +67,7 @@ function color.resetfg()
if color.disabled then
return ''
end
return color.escapefg(color.WHITE)
return color.escapefg(color.DEFAULT)
end
function color.escapebg(color_value)
@ -81,7 +81,7 @@ function color.resetbg()
if color.disabled then
return ''
end
return color.escapebg(color.BLACK)
return color.escapebg(color.DEFAULT)
end
function color.escape(fg_color, bg_color, attribute)
@ -101,7 +101,7 @@ function color.default()
if color.disabled then
return ""
end
return color.escape(color.WHITE, color.BLACK, color.DEFAULT)
return color.escape(color.DEFAULT, color.DEFAULT)
end
function color.highlight(str)

View File

@ -48,7 +48,7 @@ local beastie_color = {
" \\ / /\\",
" \027[36m______\027[31m( (_ / \\______/",
" \027[36m,' ,-----' |",
" `--{__________)\027[37m"
" `--{__________)\027[m"
}
drawer.addLogo("beastie", {

View File

@ -44,7 +44,7 @@ local orb_color = {
" -- \027[31;1m-.\027[31m",
" `:` \027[31;1m`:`",
" \027[31;1m.-- `--.",
" .---.....----.\027[37m"
" .---.....----.\027[m"
}
drawer.addLogo("orb", {

View File

@ -47,10 +47,10 @@ local return_menu_entry = {
local function OnOff(str, value)
if value then
return str .. color.escapefg(color.GREEN) .. "On" ..
color.escapefg(color.WHITE)
color.resetfg()
else
return str .. color.escapefg(color.RED) .. "off" ..
color.escapefg(color.WHITE)
color.resetfg()
end
end