summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Libraries/LibVT/Terminal.cpp15
-rw-r--r--Libraries/LibVT/Terminal.h1
2 files changed, 16 insertions, 0 deletions
diff --git a/Libraries/LibVT/Terminal.cpp b/Libraries/LibVT/Terminal.cpp
index 4241392053..cd7ee9d1b3 100644
--- a/Libraries/LibVT/Terminal.cpp
+++ b/Libraries/LibVT/Terminal.cpp
@@ -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;
diff --git a/Libraries/LibVT/Terminal.h b/Libraries/LibVT/Terminal.h
index 7679eb6fa7..1c6bf482a0 100644
--- a/Libraries/LibVT/Terminal.h
+++ b/Libraries/LibVT/Terminal.h
@@ -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;