mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-22 20:45:14 +00:00
LibVT: Support HVP (Horizontal and Vertical Position) (final 'f')
This commit is contained in:
parent
e6f5ce8285
commit
20e41ab381
Notes:
sideshowbarker
2024-07-19 09:49:54 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/20e41ab381d
2 changed files with 16 additions and 0 deletions
|
@ -290,6 +290,18 @@ void Terminal::escape$H(const ParamVector& params)
|
|||
set_cursor(row - 1, col - 1);
|
||||
}
|
||||
|
||||
void Terminal::escape$f(const ParamVector& params)
|
||||
{
|
||||
// HVP – Horizontal and Vertical Position
|
||||
unsigned row = 1;
|
||||
unsigned col = 1;
|
||||
if (params.size() >= 1)
|
||||
row = params[0];
|
||||
if (params.size() >= 2)
|
||||
col = params[1];
|
||||
set_cursor(row - 1, col - 1);
|
||||
}
|
||||
|
||||
void Terminal::escape$A(const ParamVector& params)
|
||||
{
|
||||
int num = 1;
|
||||
|
@ -668,6 +680,9 @@ void Terminal::execute_escape_sequence(u8 final)
|
|||
case 'c':
|
||||
escape$c(params);
|
||||
break;
|
||||
case 'f':
|
||||
escape$f(params);
|
||||
break;
|
||||
default:
|
||||
dbgprintf("Terminal::execute_escape_sequence: Unhandled final '%c'\n", final);
|
||||
break;
|
||||
|
|
|
@ -171,6 +171,7 @@ private:
|
|||
void escape$L(const ParamVector&);
|
||||
void escape$h_l(bool, bool, const ParamVector&);
|
||||
void escape$c(const ParamVector&);
|
||||
void escape$f(const ParamVector&);
|
||||
|
||||
TerminalClient& m_client;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue