more vte+rxvt cleanup. see #89.

This commit is contained in:
Christopher Jeffrey 2015-01-31 18:49:15 -08:00
parent 3cdcc7a64b
commit 37f2313979

View File

@ -387,24 +387,6 @@ Program.prototype._bindMouse = function(s, buf) {
}
}
if (this.isVTE && (parts = /^\x1b\[M([\u0000-\uffff]{3})/.exec(s))) {
var b = parts[1].charCodeAt(0)
, x = parts[1].charCodeAt(1)
, y = parts[1].charCodeAt(2)
, mod;
if (x >= 65533) x = buf[4];
if (y >= 65533) y = buf[5];
// if libvte goes over 255, it sends this.
// if (x > 0x00 && x < 0x20) x += 223;
// if (y > 0x00 && y < 0x20) y += 223;
s = '\x1b[M' + parts[1][0]
+ String.fromCharCode(x)
+ String.fromCharCode(y);
}
// XTerm / X10
if (parts = /^\x1b\[M([\x00\u0020-\uffff]{3})/.exec(s)) {
var b = parts[1].charCodeAt(0)
@ -2672,11 +2654,16 @@ Program.prototype.enableMouse = function() {
}, true);
}
// libvte is broken
// NOTE: The old version of vte xfce-term uses
// doesn't support the urxvt or sgr mouse protocols.
// However, it seems to have supported SGR events before URXVT events. We'll
// stick to that and hope people are using the latest VTE.
// rxvt does not support the X10 UTF extensions
if (this.term('rxvt')) {
return this.setMouse({
x10Mouse: true,
allMotion: true
}, true);
}
// libvte is broken, older versions do not support the
// X10 UTF extension, later versions do support SGR however
if (this.isVTE) {
return this.setMouse({
sgrMouse: true,