1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 03:08:13 +00:00

LibVT: Respect the Negative attribute when drawing text

This makes the "reverse video" SGR actually work.
This commit is contained in:
AnotherTest 2021-01-10 16:41:48 +03:30 committed by Andreas Kling
parent 2f3b901f7f
commit 44305ea214
4 changed files with 12 additions and 9 deletions

View file

@ -104,9 +104,9 @@ bool Line::has_only_one_background_color() const
if (!m_length)
return true;
// FIXME: Cache this result?
auto color = m_attributes[0].background_color;
auto color = m_attributes[0].effective_background_color();
for (size_t i = 1; i < m_length; ++i) {
if (m_attributes[i].background_color != color)
if (m_attributes[i].effective_background_color() != color)
return false;
}
return true;