fix tmux passthrough.

This commit is contained in:
Christopher Jeffrey 2015-07-19 04:59:16 -07:00
parent 940bf564a4
commit 415b35e7ee

View File

@ -1495,9 +1495,14 @@ Program.prototype._write = function(text) {
// Example: `DCS tmux; ESC Pt ST`
// Real: `DCS tmux; ESC Pt ESC \`
Program.prototype._twrite = function(data) {
if (this.tmux) data = '\x1bPtmux;\x1b' + data + '\x1b\\';
// Should work but tmux doesn't implement ST correctly:
// if (this.tmux) data = '\x1bPtmux;\x1b' + data + '\x07';
if (this.tmux) {
data = '\x1bPtmux;\x1b' + data + '\x1b\\';
// Should work but tmux doesn't implement ST correctly:
// data = '\x1bPtmux;\x1b' + data + '\x07';
// NOTE: Flushing the buffer is required in some cases.
this.flush();
return this.output.write(data);
}
return this._write(data);
};