summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlbert Astals Cid <[email protected]>2017-09-01 19:14:04 +0200
committerAlbert Astals Cid <[email protected]>2017-09-02 10:54:28 +0200
commit6dc09a36c106879f3b86d024e6b95ac0f5f028c8 (patch)
treec03945199225dd3b52bea746c5502811ad1ef880
parent3a534c49cd282a97ef165890e9b1e7772e3e5324 (diff)
Ignore xterm-DCS messages
Summary: Would be ideal to process them too, but they seem kind of corner case and ignoring them fixes vim having $q q written on the first line on startup BUGS: 383976 Test Plan: Ran vim, looks good Should this go to 17.08 or master? Reviewers: hindenburg Reviewed By: hindenburg Subscribers: #konsole Tags: #konsole Differential Revision: https://phabricator.kde.org/D7644
-rw-r--r--src/Vt102Emulation.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/Vt102Emulation.cpp b/src/Vt102Emulation.cpp
index c626a35..d8b1dfb 100644
--- a/src/Vt102Emulation.cpp
+++ b/src/Vt102Emulation.cpp
@@ -291,6 +291,7 @@ void Vt102Emulation::initTokenizer()
#define Xpe (tokenBufferPos >= 2 && tokenBuffer[1] == ']')
#define Xte (Xpe && (cc == 7 || cc == 27))
#define ces(C) (cc < 256 && (charClass[cc] & (C)) == (C) && !Xte)
+#define dcs (p >= 2 && s[0] == ESC && s[1] == 'P')
#define CNTL(c) ((c)-'@')
const int ESC = 27;
@@ -333,6 +334,7 @@ void Vt102Emulation::receiveChar(int cc)
if (lec(3,2,'>')) { return; }
if (lec(3,2,'!')) { return; }
if (lun( )) { processToken( TY_CHR(), applyCharset(cc), 0); resetTokenizer(); return; }
+ if (dcs ) { return; /* TODO We don't xterm DCS, so we just eat it */ }
if (lec(2,0,ESC)) { processToken( TY_ESC(s[1]), 0, 0); resetTokenizer(); return; }
if (les(3,1,SCS)) { processToken( TY_ESC_CS(s[1],s[2]), 0, 0); resetTokenizer(); return; }
if (lec(3,1,'#')) { processToken( TY_ESC_DE(s[2]), 0, 0); resetTokenizer(); return; }