1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 12:37:44 +00:00

Terminal: <esc>[m should clear the current attribute.

This was causing GCC error messages to appear in all-red text.
This commit is contained in:
Andreas Kling 2019-04-30 01:23:20 +02:00
parent 98a0e10319
commit a274196bd7

View file

@ -138,6 +138,10 @@ static inline Color lookup_color(unsigned color)
void Terminal::escape$m(const ParamVector& params) void Terminal::escape$m(const ParamVector& params)
{ {
if (params.is_empty()) {
m_current_attribute.reset();
return;
}
if (params.size() == 3 && params[1] == 5) { if (params.size() == 3 && params[1] == 5) {
if (params[0] == 38) { if (params[0] == 38) {
m_current_attribute.foreground_color = params[2]; m_current_attribute.foreground_color = params[2];