Skip to content

Commit

Permalink
Add useFlowControl option
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyriar committed Jan 27, 2017
1 parent f30504b commit 331ecd8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/xterm.js
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,8 @@ Terminal.defaults = {
screenKeys: false,
debug: false,
cancelEvents: false,
disableStdin: false
disableStdin: false,
useFlowControl: false
// programFeatures: false,
// focusKeys: false,
};
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 331ecd8

Please sign in to comment.