summaryrefslogtreecommitdiff
path: root/Kernel/TTY
diff options
context:
space:
mode:
authorAnotherTest <ali.mpfard@gmail.com>2021-01-10 16:41:48 +0330
committerAndreas Kling <kling@serenityos.org>2021-01-10 16:58:08 +0100
commit44305ea21419f0fdd5c98e6c4c749cd73a840123 (patch)
treeb7e357d6b038af68908475e928ca6c3402aa7ecb /Kernel/TTY
parent2f3b901f7fe230cbbf489f5a0f38fbb34a07af8c (diff)
downloadserenity-44305ea21419f0fdd5c98e6c4c749cd73a840123.zip
LibVT: Respect the Negative attribute when drawing text
This makes the "reverse video" SGR actually work.
Diffstat (limited to 'Kernel/TTY')
-rw-r--r--Kernel/TTY/VirtualConsole.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Kernel/TTY/VirtualConsole.cpp b/Kernel/TTY/VirtualConsole.cpp
index 6b00892a3d..f6e530b2ee 100644
--- a/Kernel/TTY/VirtualConsole.cpp
+++ b/Kernel/TTY/VirtualConsole.cpp
@@ -274,11 +274,11 @@ static inline u8 attribute_to_vga(const VT::Attribute& attribute)
// Background color
vga_attr &= ~0x70;
- vga_attr |= xterm_color_to_vga(attribute.background_color) << 8;
+ vga_attr |= xterm_color_to_vga(attribute.effective_background_color()) << 8;
// Foreground color
vga_attr &= ~0x7;
- vga_attr |= xterm_color_to_vga(attribute.foreground_color);
+ vga_attr |= xterm_color_to_vga(attribute.effective_foreground_color());
return vga_attr;
}