From a4607f90e21550b63fc70aa3d00d4583a3dff8ae Mon Sep 17 00:00:00 2001 From: Daniel Risacher Date: Thu, 5 Dec 2013 14:56:45 -0500 Subject: [PATCH] Fix issue chjj/tty.js#59 ^[[>##m and ^[[>##n are legal escape sequences, but were being parsed as if they were ^[[##m or ^[[##n. Added a test for prefix character ('>' is the only legal one) See http://invisible-island.net/xterm/ctlseqs/ctlseqs.html, codes for CSI > P s ; P s m If the prefix char is present, ignores the control sequence, since that code isn't implemented. --- src/term.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/term.js b/src/term.js index 61f9eee0..3af1a07c 100644 --- a/src/term.js +++ b/src/term.js @@ -1902,12 +1902,16 @@ Terminal.prototype.write = function(data) { // CSI Pm m Character Attributes (SGR). case 'm': - this.charAttributes(this.params); + if (!this.prefix) { + this.charAttributes(this.params); + } break; // CSI Ps n Device Status Report (DSR). case 'n': - this.deviceStatus(this.params); + if (!this.prefix) { + this.deviceStatus(this.params); + } break; /**