termemu.js: handle some tmux-produced control sequences.
This commit is contained in:
parent
5b85a979e0
commit
95fddfb788
1 changed files with 11 additions and 3 deletions
14
termemu.js
14
termemu.js
|
|
@ -1046,6 +1046,10 @@ var termemu = {
|
||||||
}
|
}
|
||||||
else if (c == 109) {
|
else if (c == 109) {
|
||||||
/* m - character attributes */
|
/* m - character attributes */
|
||||||
|
if (prefix !== null) {
|
||||||
|
debug(1, "Unimplemented CSI sequence: " + comstr);
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (params.length == 0)
|
if (params.length == 0)
|
||||||
this.clearAttrs();
|
this.clearAttrs();
|
||||||
for (var i = 0; i < params.length; i++) {
|
for (var i = 0; i < params.length; i++) {
|
||||||
|
|
@ -1117,8 +1121,8 @@ var termemu = {
|
||||||
else
|
else
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (this.comseq[i] != 59) {
|
if (i < this.comseq.length && this.comseq[i] != 59) {
|
||||||
debug(1, "Invalid OSC sequence");
|
debug(1, "Invalid OSC sequence: " + this.comseq.toString());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var codenum = Number(numstr);
|
var codenum = Number(numstr);
|
||||||
|
|
@ -1165,7 +1169,11 @@ var termemu = {
|
||||||
function dchunk(codes) {
|
function dchunk(codes) {
|
||||||
var dstr = "Chunk: ";
|
var dstr = "Chunk: ";
|
||||||
for (var i = 0; i < codes.length; i++) {
|
for (var i = 0; i < codes.length; i++) {
|
||||||
if (codes[i] < 32 || (codes[i] >= 127 && codes[i] < 160))
|
if (codes[i] == 27)
|
||||||
|
dstr += "\\e";
|
||||||
|
else if (codes[i] == 92)
|
||||||
|
dstr += "\\\\";
|
||||||
|
else if (codes[i] < 32 || (codes[i] >= 127 && codes[i] < 160))
|
||||||
dstr += "\\x" + codes[i].toString(16);
|
dstr += "\\x" + codes[i].toString(16);
|
||||||
else
|
else
|
||||||
dstr += String.fromCharCode(codes[i]);
|
dstr += String.fromCharCode(codes[i]);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue