From b89fc3fe8725f09a135904dc493f8c14666de143 Mon Sep 17 00:00:00 2001 From: Bananymous Date: Thu, 26 Sep 2024 15:08:11 +0300 Subject: [PATCH] Kernel: Implement ANSI SGR 7 to invert colors This allows vim's visual selection to show up --- kernel/kernel/Terminal/VirtualTTY.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/kernel/kernel/Terminal/VirtualTTY.cpp b/kernel/kernel/Terminal/VirtualTTY.cpp index b6ab6943..b4e6f755 100644 --- a/kernel/kernel/Terminal/VirtualTTY.cpp +++ b/kernel/kernel/Terminal/VirtualTTY.cpp @@ -121,6 +121,10 @@ namespace Kernel m_background = TerminalColor::BLACK; break; + case 7: + BAN::swap(m_foreground, m_background); + break; + case 30: m_foreground = TerminalColor::BLACK; break; case 31: m_foreground = TerminalColor::RED; break; case 32: m_foreground = TerminalColor::GREEN; break;