Fix a couple bugs with underline highlighting

Add missing curly_underline attribute to json-rpc
Fix underline color not correct after attrbute only change
This commit is contained in:
Maxime Coste 2022-12-13 12:14:29 +11:00
parent a52bb9146e
commit 36d1713b09
2 changed files with 2 additions and 1 deletions

View File

@ -38,6 +38,7 @@ String to_json(Attribute attributes)
struct Attr { Attribute attr; StringView name; }
attrs[] {
{ Attribute::Underline, "underline" },
{ Attribute::CurlyUnderline, "curly_underline" },
{ Attribute::Reverse, "reverse" },
{ Attribute::Blink, "blink" },
{ Attribute::Bold, "bold" },

View File

@ -247,7 +247,7 @@ void TerminalUI::Screen::set_face(const Face& face, Writer& writer)
if (face.attributes & (Attribute)(1 << i))
format_with(writer, ";{}", attr_table[i]);
}
m_active_face.fg = m_active_face.bg = Color::Default;
m_active_face.fg = m_active_face.bg = m_active_face.underline = Color::Default;
join = true;
}
if (m_active_face.fg != face.fg)