Author: kevans
Date: Tue Mar 20 20:05:11 2018
New Revision: 331257
URL: https://svnweb.freebsd.org/changeset/base/331257

Log:
  lualoader: Reset attributes and color scheme with color.highlight()
  
  Previously, we sent a CSI 0m sequence to reset attributes, which also reset
  the color scheme if the terminal defaults didn't match what we're expecting.
  Go all-in and reset the color scheme, too, just in case.
  
  Reported by:  emaste

Modified:
  head/stand/lua/color.lua

Modified: head/stand/lua/color.lua
==============================================================================
--- head/stand/lua/color.lua    Tue Mar 20 19:28:52 2018        (r331256)
+++ head/stand/lua/color.lua    Tue Mar 20 20:05:11 2018        (r331257)
@@ -96,7 +96,9 @@ function color.highlight(str)
        if color.disabled then
                return str
        end
-       return core.KEYSTR_CSI .. "1m" .. str .. core.KEYSTR_CSI .. "0m"
+       -- We need to reset attributes as well as color scheme here, just in
+       -- case the terminal defaults don't match what we're expecting.
+       return core.KEYSTR_CSI .. "1m" .. str .. color.default()
 end
 
 return color
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to