mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
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
This commit is contained in:
parent
b7d779b3e5
commit
4a034bad21
1 changed files with 3 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue