mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-22 04:25:13 +00:00
LibVT: Support IND and RI (cursor down/up basically)
This commit is contained in:
parent
0d191aae13
commit
dca92af431
Notes:
sideshowbarker
2024-07-19 09:49:41 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/dca92af4312
2 changed files with 23 additions and 0 deletions
|
@ -773,6 +773,18 @@ void Terminal::NEL()
|
|||
newline();
|
||||
}
|
||||
|
||||
void Terminal::IND()
|
||||
{
|
||||
// IND - Index (move down)
|
||||
escape$B({});
|
||||
}
|
||||
|
||||
void Terminal::RI()
|
||||
{
|
||||
// RI - Reverse Index (move up)
|
||||
escape$A({});
|
||||
}
|
||||
|
||||
void Terminal::on_char(u8 ch)
|
||||
{
|
||||
#ifdef TERMINAL_DEBUG
|
||||
|
@ -789,11 +801,20 @@ void Terminal::on_char(u8 ch)
|
|||
m_escape_state = ExpectXtermParameter1;
|
||||
} else if (ch == '#') {
|
||||
m_escape_state = ExpectHashtagDigit;
|
||||
} else if (ch == 'D') {
|
||||
IND();
|
||||
m_escape_state = Normal;
|
||||
return;
|
||||
} else if (ch == 'M') {
|
||||
RI();
|
||||
m_escape_state = Normal;
|
||||
return;
|
||||
} else if (ch == 'E') {
|
||||
NEL();
|
||||
m_escape_state = Normal;
|
||||
return;
|
||||
} else {
|
||||
dbg() << "Unexpected character in GotEscape '" << (char)ch << "'";
|
||||
m_escape_state = Normal;
|
||||
}
|
||||
return;
|
||||
|
|
|
@ -173,6 +173,8 @@ private:
|
|||
void escape$c(const ParamVector&);
|
||||
void escape$f(const ParamVector&);
|
||||
void NEL();
|
||||
void IND();
|
||||
void RI();
|
||||
|
||||
TerminalClient& m_client;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue