diff --git a/src/Vt102Emulation.cpp b/src/Vt102Emulation.cpp index 51bc8154..66061832 100644 --- a/src/Vt102Emulation.cpp +++ b/src/Vt102Emulation.cpp @@ -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]; diff --git a/src/Vt102Emulation.h b/src/Vt102Emulation.h index db14f72d..661473f5 100644 --- a/src/Vt102Emulation.h +++ b/src/Vt102Emulation.h @@ -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);