From 331ecd8f9327008f64e10a82bccab8be958bce9e Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Thu, 26 Jan 2017 21:14:07 -0800 Subject: [PATCH] Add useFlowControl option Fixes #511 --- src/xterm.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/xterm.js b/src/xterm.js index 99540891db..d031b311a0 100644 --- a/src/xterm.js +++ b/src/xterm.js @@ -360,7 +360,8 @@ Terminal.defaults = { screenKeys: false, debug: false, cancelEvents: false, - disableStdin: false + disableStdin: false, + useFlowControl: false // programFeatures: false, // focusKeys: false, }; @@ -1449,7 +1450,7 @@ Terminal.prototype.write = function(data) { // Send XOFF to pause the pty process if the write buffer becomes too large so // xterm.js can catch up before more data is sent. This is necessary in order // to keep signals such as ^C responsive. - if (!this.xoffSentToCatchUp && this.writeBuffer.length >= WRITE_BUFFER_PAUSE_THRESHOLD) { + if (this.options.useFlowControl && !this.xoffSentToCatchUp && this.writeBuffer.length >= WRITE_BUFFER_PAUSE_THRESHOLD) { // XOFF - stop pty pipe // XON will be triggered by emulator before processing data chunk this.send(C0.DC3);