From df7a462f856435000aad02e96539cc546763a535 Mon Sep 17 00:00:00 2001 From: "Martin T. H. Sandsmark" Date: Mon, 16 May 2022 19:24:18 +0200 Subject: [PATCH] Fix compatibility with xterm's OSC 104 without arguments It is called by `reset`. --- src/Vt102Emulation.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/Vt102Emulation.cpp b/src/Vt102Emulation.cpp index 7e1f1de66..ded86522c 100644 --- a/src/Vt102Emulation.cpp +++ b/src/Vt102Emulation.cpp @@ -1038,7 +1038,18 @@ void Vt102Emulation::processSessionAttributeRequest(const int tokenSize, const u /* clang-format on */ if (tokenBuffer[i] != ';') { - reportDecodingError(token_osc(terminator)); + // No arguments + switch(attribute) { + case 104: // 104 without any argument means clear entire color table + for (int i=0; i<256; i++) { + colorTable[i] = QColor(); + } + break; + default: + reportDecodingError(token_osc(terminator)); + break; + } + return; } // skip initial ';'