Commit bc4a631b authored by Matan Ziv-Av's avatar Matan Ziv-Av Committed by Tomaz Canabrava
Browse files

Support iTerm2 ReportCellSize OSC

parent b621d0c0
Pipeline #179950 passed with stage
in 4 minutes and 18 seconds
......@@ -799,6 +799,10 @@ void Vt102Emulation::processSessionAttributeRequest(int tokenSize)
}
if (attribute == 1337) {
if (value.startsWith(QLatin1String("ReportCellSize"))) {
iTermReportCellSize();
return;
}
if (!value.startsWith(QLatin1String("File="))) {
return;
}
......@@ -1581,6 +1585,17 @@ void Vt102Emulation::reportPixelSize()
sendString(tmp);
}
void Vt102Emulation::iTermReportCellSize()
{
char tmp[50];
snprintf(tmp,
sizeof(tmp),
"\033]1337;ReportCellSize=%d.0;%d.0;1.0\007",
_currentScreen->currentTerminalDisplay()->terminalFont()->fontHeight(),
_currentScreen->currentTerminalDisplay()->terminalFont()->fontWidth());
sendString(tmp);
}
void Vt102Emulation::reportCellSize()
{
char tmp[30];
......
......@@ -163,6 +163,7 @@ private:
void reportCursorPosition();
void reportPixelSize();
void reportCellSize();
void iTermReportCellSize();
void reportSize();
void reportColor(int c, QColor color);
void reportTerminalParms(int p);
......
Supports Markdown
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