mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 18:28:12 +00:00
LibVT: Respect the Negative attribute when drawing text
This makes the "reverse video" SGR actually work.
This commit is contained in:
parent
2f3b901f7f
commit
44305ea214
4 changed files with 12 additions and 9 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue