Commit f4c5adec authored by Luis Javier Merino's avatar Luis Javier Merino
Browse files

Support reporting text area size

Add support for CSI 18 t, which reports the text area size in
characters.
parent 83bc8b2d
......@@ -780,6 +780,7 @@ void Vt102Emulation::processToken(int token, int p, int q)
Q_EMIT imageResizeRequest(QSize(q, p)); // Note columns (x), rows (y) in QSize
break;
case token_csi_ps('t', 18) : reportSize(); break;
// change tab text color : \e[28;<color>t color: 0-16,777,215
case token_csi_ps('t', 28) : /* IGNORED: konsole-specific KDE3-era extension, not implemented */ break;
......@@ -1113,6 +1114,13 @@ void Vt102Emulation::reportCursorPosition()
sendString(tmp);
}
void Vt102Emulation::reportSize()
{
char tmp[30];
snprintf(tmp, sizeof(tmp), "\033[8;%d;%dt", _currentScreen->getLines(), _currentScreen->getColumns());
sendString(tmp);
}
void Vt102Emulation::reportTerminalType()
{
// Primary device attribute response (Request was: ^[[0c or ^[[c (from TT321 Users Guide))
......
......@@ -146,6 +146,7 @@ private:
void reportStatus();
void reportAnswerBack();
void reportCursorPosition();
void reportSize();
void reportTerminalParms(int p);
// clears the screen and resizes it to the specified
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment