Commit 6dc09a36 authored by Albert Astals Cid's avatar Albert Astals Cid

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
parent 3a534c49
......@@ -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; }
......
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