Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 3 May 2020 03:54:49 +0000 (UTC)
From:      Kyle Evans <kevans@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r360597 - stable/11/stand/lua
Message-ID:  <202005030354.0433sncd037171@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kevans
Date: Sun May  3 03:54:49 2020
New Revision: 360597
URL: https://svnweb.freebsd.org/changeset/base/360597

Log:
  MFC r352601: loader_lua: lua color changes should end with reset
  
  The color change should have reset sequence, not switch to white.

Modified:
  stable/11/stand/lua/color.lua
  stable/11/stand/lua/logo-beastie.lua
  stable/11/stand/lua/logo-orb.lua
  stable/11/stand/lua/menu.lua
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/stand/lua/color.lua
==============================================================================
--- stable/11/stand/lua/color.lua	Sun May  3 03:53:38 2020	(r360596)
+++ stable/11/stand/lua/color.lua	Sun May  3 03:54:49 2020	(r360597)
@@ -47,7 +47,7 @@ color.MAGENTA = 5
 color.CYAN    = 6
 color.WHITE   = 7
 
-color.DEFAULT = 0
+color.DEFAULT = 9
 color.BRIGHT  = 1
 color.DIM     = 2
 
@@ -70,7 +70,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)
@@ -84,7 +84,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)
@@ -104,7 +104,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)

Modified: stable/11/stand/lua/logo-beastie.lua
==============================================================================
--- stable/11/stand/lua/logo-beastie.lua	Sun May  3 03:53:38 2020	(r360596)
+++ stable/11/stand/lua/logo-beastie.lua	Sun May  3 03:54:49 2020	(r360597)
@@ -49,7 +49,7 @@ local beastie_color = {
 "                \\       /       /\\",
 "           \027[36m______\027[31m( (_  / \\______/",
 "         \027[36m,'  ,-----'   |",
-"         `--{__________)\027[37m"
+"         `--{__________)\027[m"
 }
 
 drawer.addLogo("beastie", {

Modified: stable/11/stand/lua/logo-orb.lua
==============================================================================
--- stable/11/stand/lua/logo-orb.lua	Sun May  3 03:53:38 2020	(r360596)
+++ stable/11/stand/lua/logo-orb.lua	Sun May  3 03:54:49 2020	(r360597)
@@ -45,7 +45,7 @@ local orb_color = {
 "   --                      \027[31;1m-.\027[31m",
 "    `:`                  \027[31;1m`:`",
 "      \027[31;1m.--             `--.",
-"         .---.....----.\027[37m"
+"         .---.....----.\027[m"
 }
 
 drawer.addLogo("orb", {

Modified: stable/11/stand/lua/menu.lua
==============================================================================
--- stable/11/stand/lua/menu.lua	Sun May  3 03:53:38 2020	(r360596)
+++ stable/11/stand/lua/menu.lua	Sun May  3 03:54:49 2020	(r360597)
@@ -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
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202005030354.0433sncd037171>