1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 08:47:34 +00:00

LibVT: Support NEL (Next Line)

I think this can just behave as if you sent a newline character ('\n').
This commit is contained in:
Andreas Kling 2020-01-25 20:01:43 +01:00
parent ab77bd4c3a
commit 897ad1b927
2 changed files with 11 additions and 0 deletions

View file

@ -767,6 +767,12 @@ void Terminal::put_character_at(unsigned row, unsigned column, u8 ch)
m_last_char = ch; m_last_char = ch;
} }
void Terminal::NEL()
{
// NEL - Next Line
newline();
}
void Terminal::on_char(u8 ch) void Terminal::on_char(u8 ch)
{ {
#ifdef TERMINAL_DEBUG #ifdef TERMINAL_DEBUG
@ -783,6 +789,10 @@ void Terminal::on_char(u8 ch)
m_escape_state = ExpectXtermParameter1; m_escape_state = ExpectXtermParameter1;
} else if (ch == '#') { } else if (ch == '#') {
m_escape_state = ExpectHashtagDigit; m_escape_state = ExpectHashtagDigit;
} else if (ch == 'E') {
NEL();
m_escape_state = Normal;
return;
} else { } else {
m_escape_state = Normal; m_escape_state = Normal;
} }

View file

@ -172,6 +172,7 @@ private:
void escape$h_l(bool, bool, const ParamVector&); void escape$h_l(bool, bool, const ParamVector&);
void escape$c(const ParamVector&); void escape$c(const ParamVector&);
void escape$f(const ParamVector&); void escape$f(const ParamVector&);
void NEL();
TerminalClient& m_client; TerminalClient& m_client;