Skip to content

Commit 365a9f9

Browse files
authored
Merge pull request #513 from Tyriar/511_useFlowControl_option
Add useFlowControl option
2 parents d6de156 + c2a6972 commit 365a9f9

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/xterm.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,7 @@ Terminal.defaults = {
361361
debug: false,
362362
cancelEvents: false,
363363
disableStdin: false,
364+
useFlowControl: false,
364365
tabStopWidth: 8
365366
// programFeatures: false,
366367
// focusKeys: false,
@@ -1451,7 +1452,7 @@ Terminal.prototype.write = function(data) {
14511452
// Send XOFF to pause the pty process if the write buffer becomes too large so
14521453
// xterm.js can catch up before more data is sent. This is necessary in order
14531454
// to keep signals such as ^C responsive.
1454-
if (!this.xoffSentToCatchUp && this.writeBuffer.length >= WRITE_BUFFER_PAUSE_THRESHOLD) {
1455+
if (this.options.useFlowControl && !this.xoffSentToCatchUp && this.writeBuffer.length >= WRITE_BUFFER_PAUSE_THRESHOLD) {
14551456
// XOFF - stop pty pipe
14561457
// XON will be triggered by emulator before processing data chunk
14571458
this.send(C0.DC3);

0 commit comments

Comments
 (0)