Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

xterm

Package Overview
Dependencies
Maintainers
2
Versions
1092
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

xterm - npm Package Compare versions

Comparing version 3.11.0 to 3.12.0

1

dist/addons/winptyCompat/winptyCompat.js

@@ -13,2 +13,3 @@ (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.winptyCompat = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){

}
addonTerminal._core.isWinptyCompatEnabled = true;
addonTerminal.on('linefeed', function () {

@@ -15,0 +16,0 @@ var line = addonTerminal._core.buffer.lines.get(addonTerminal._core.buffer.ybase + addonTerminal._core.buffer.y - 1);

@@ -12,2 +12,3 @@ "use strict";

}
addonTerminal._core.isWinptyCompatEnabled = true;
addonTerminal.on('linefeed', function () {

@@ -14,0 +15,0 @@ var line = addonTerminal._core.buffer.lines.get(addonTerminal._core.buffer.ybase + addonTerminal._core.buffer.y - 1);

21

lib/Buffer.js

@@ -151,3 +151,3 @@ "use strict";

this.scrollBottom = newRows - 1;
if (this._hasScrollback) {
if (this._isReflowEnabled) {
this._reflow(newCols, newRows);

@@ -163,2 +163,9 @@ if (this._cols > newCols) {

};
Object.defineProperty(Buffer.prototype, "_isReflowEnabled", {
get: function () {
return this._hasScrollback && !this._terminal.isWinptyCompatEnabled;
},
enumerable: true,
configurable: true
});
Buffer.prototype._reflow = function (newCols, newRows) {

@@ -169,3 +176,3 @@ if (this._cols === newCols) {

if (newCols > this._cols) {
this._reflowLarger(newCols);
this._reflowLarger(newCols, newRows);
}

@@ -176,3 +183,3 @@ else {

};
Buffer.prototype._reflowLarger = function (newCols) {
Buffer.prototype._reflowLarger = function (newCols, newRows) {
var toRemove = BufferReflow_1.reflowLargerGetLinesToRemove(this.lines, newCols, this.ybase + this.y);

@@ -182,6 +189,6 @@ if (toRemove.length > 0) {

BufferReflow_1.reflowLargerApplyNewLayout(this.lines, newLayoutResult.layout);
this._reflowLargerAdjustViewport(newCols, newLayoutResult.countRemoved);
this._reflowLargerAdjustViewport(newCols, newRows, newLayoutResult.countRemoved);
}
};
Buffer.prototype._reflowLargerAdjustViewport = function (newCols, countRemoved) {
Buffer.prototype._reflowLargerAdjustViewport = function (newCols, newRows, countRemoved) {
var viewportAdjustments = countRemoved;

@@ -193,3 +200,3 @@ while (viewportAdjustments-- > 0) {

}
if (this.lines.length < this._rows) {
if (this.lines.length < newRows) {
this.lines.push(new BufferLine_1.BufferLine(newCols, exports.FILL_CHAR_DATA));

@@ -276,3 +283,3 @@ }

if (this.ybase === 0) {
if (this.y < this._rows - 1) {
if (this.y < newRows - 1) {
this.y++;

@@ -279,0 +286,0 @@ this.lines.pop();

@@ -102,2 +102,4 @@ "use strict";

this._compositionView.style.lineHeight = cellHeight + 'px';
this._compositionView.style.fontFamily = this._terminal.options.fontFamily;
this._compositionView.style.fontSize = this._terminal.options.fontSize + 'px';
var compositionViewBounds = this._compositionView.getBoundingClientRect();

@@ -104,0 +106,0 @@ this._textarea.style.left = cursorLeft + 'px';

@@ -724,3 +724,5 @@ "use strict";

}
this._terminal.selectionManager.disable();
if (this._terminal.selectionManager) {
this._terminal.selectionManager.disable();
}
this._terminal.log('Binding to mouse events.');

@@ -816,3 +818,5 @@ break;

}
this._terminal.selectionManager.enable();
if (this._terminal.selectionManager) {
this._terminal.selectionManager.enable();
}
break;

@@ -819,0 +823,0 @@ case 1004:

@@ -127,3 +127,3 @@ "use strict";

this._clipRow(terminal, y);
this._ctx.fillText(charData[Buffer_1.CHAR_DATA_CHAR_INDEX], x * this._scaledCellWidth + this._scaledCharLeft, (y + 0.5) * this._scaledCellHeight + this._scaledCharTop);
this._ctx.fillText(charData[Buffer_1.CHAR_DATA_CHAR_INDEX], x * this._scaledCellWidth + this._scaledCharLeft, y * this._scaledCellHeight + this._scaledCharTop + this._scaledCharHeight / 2);
};

@@ -162,3 +162,3 @@ BaseRenderLayer.prototype.drawChars = function (terminal, chars, code, width, x, y, fg, bg, bold, dim, italic) {

}
this._ctx.fillText(chars, x * this._scaledCellWidth + this._scaledCharLeft, (y + 0.5) * this._scaledCellHeight + this._scaledCharTop);
this._ctx.fillText(chars, x * this._scaledCellWidth + this._scaledCharLeft, y * this._scaledCellHeight + this._scaledCharTop + this._scaledCharHeight / 2);
this._ctx.restore();

@@ -165,0 +165,0 @@ };

@@ -66,3 +66,3 @@ "use strict";

if ('IntersectionObserver' in window) {
var observer_1 = new IntersectionObserver(function (e) { return _this.onIntersectionChange(e[0]); }, { threshold: 0 });
var observer_1 = new IntersectionObserver(function (e) { return _this.onIntersectionChange(e[e.length - 1]); }, { threshold: 0 });
observer_1.observe(_this._terminal.element);

@@ -69,0 +69,0 @@ _this.register({ dispose: function () { return observer_1.disconnect(); } });

@@ -48,2 +48,3 @@ "use strict";

if (!start || !end) {
this._clearState();
return;

@@ -50,0 +51,0 @@ }

@@ -43,3 +43,3 @@ "use strict";

var WRITE_BUFFER_PAUSE_THRESHOLD = 5;
var WRITE_BATCH_SIZE = 300;
var WRITE_TIMEOUT_MS = 12;
var MINIMUM_COLS = 2;

@@ -477,2 +477,8 @@ var MINIMUM_ROWS = 1;

this.element.classList.toggle('enable-mouse-events', this.mouseEvents);
if (this.mouseEvents) {
this.selectionManager.disable();
}
else {
this.selectionManager.enable();
}
if (this.options.screenReaderMode) {

@@ -881,11 +887,13 @@ this._accessibilityManager = new AccessibilityManager_1.AccessibilityManager(this);

};
Terminal.prototype._innerWrite = function () {
Terminal.prototype._innerWrite = function (bufferOffset) {
var _this = this;
if (bufferOffset === void 0) { bufferOffset = 0; }
if (this._isDisposed) {
this.writeBuffer = [];
}
var writeBatch = this.writeBuffer.splice(0, WRITE_BATCH_SIZE);
while (writeBatch.length > 0) {
var data = writeBatch.shift();
if (this._xoffSentToCatchUp && writeBatch.length === 0 && this.writeBuffer.length === 0) {
var startTime = Date.now();
while (this.writeBuffer.length > bufferOffset) {
var data = this.writeBuffer[bufferOffset];
bufferOffset++;
if (this._xoffSentToCatchUp && this.writeBuffer.length === bufferOffset) {
this.handler(EscapeSequences_1.C0.DC1);

@@ -899,8 +907,12 @@ this._xoffSentToCatchUp = false;

this.refresh(this._refreshStart, this._refreshEnd);
if (Date.now() - startTime >= WRITE_TIMEOUT_MS) {
break;
}
}
if (this.writeBuffer.length > 0) {
setTimeout(function () { return _this._innerWrite(); }, 0);
if (this.writeBuffer.length > bufferOffset) {
setTimeout(function () { return _this._innerWrite(bufferOffset); }, 0);
}
else {
this._writeInProgress = false;
this.writeBuffer = [];
}

@@ -907,0 +919,0 @@ };

@@ -31,2 +31,3 @@ "use strict";

_this._mouseMoveListener = function (e) { return _this._onMouseMove(e); };
_this._mouseLeaveListener = function (e) { return _this._onMouseLeave(e); };
_this._clickListener = function (e) { return _this._onClick(e); };

@@ -73,2 +74,3 @@ return _this;

this._terminal.element.addEventListener('mousemove', this._mouseMoveListener);
this._terminal.element.addEventListener('mouseleave', this._mouseLeaveListener);
this._terminal.element.addEventListener('click', this._clickListener);

@@ -81,2 +83,3 @@ }

this._terminal.element.removeEventListener('mousemove', this._mouseMoveListener);
this._terminal.element.removeEventListener('mouseleave', this._mouseLeaveListener);
this._terminal.element.removeEventListener('click', this._clickListener);

@@ -132,2 +135,11 @@ }

};
MouseZoneManager.prototype._onMouseLeave = function (e) {
if (this._currentZone) {
this._currentZone.leaveCallback();
this._currentZone = null;
if (this._tooltipTimeout) {
clearTimeout(this._tooltipTimeout);
}
}
};
MouseZoneManager.prototype._onClick = function (e) {

@@ -134,0 +146,0 @@ var zone = this._findZoneEventAt(e);

{
"name": "xterm",
"description": "Full xterm terminal, in your browser",
"version": "3.11.0",
"version": "3.12.0",
"main": "lib/public/Terminal.js",

@@ -6,0 +6,0 @@ "types": "typings/xterm.d.ts",

@@ -10,7 +10,7 @@ # [![xterm.js logo](logo-full.png)](https://xtermjs.org)

- **Terminal apps just work**: Xterm.js works with most terminal apps such as `bash`, `vim` and `tmux`, this includes support for curses-based apps and mouse event support
- **Perfomant**: Xterm.js is *really* fast, it even includes a GPU-accelerated renderer
- **Rich unicode support**: Supports CJK, emojis and IMEs
- **Self-contained**: Requires zero dependencies to work
- **Accessible**: Screen reader support can be turned on using the `screenReaderMode` option
- **Terminal apps just work**: Xterm.js works with most terminal apps such as `bash`, `vim` and `tmux`, this includes support for curses-based apps and mouse event support.
- **Perfomant**: Xterm.js is *really* fast, it even includes a GPU-accelerated renderer.
- **Rich unicode support**: Supports CJK, emojis and IMEs.
- **Self-contained**: Requires zero dependencies to work.
- **Accessible**: Screen reader support can be turned on using the `screenReaderMode` option.
- **And much more**: Links, theming, addons, well documented API, etc.

@@ -20,4 +20,4 @@

- Xterm.js is not a terminal application that you can download and use on your computer
- Xterm.js is not `bash`. Xterm.js can be connected to processes like `bash` and let you interact with them (provide input, receive output)
- Xterm.js is not a terminal application that you can download and use on your computer.
- Xterm.js is not `bash`. Xterm.js can be connected to processes like `bash` and let you interact with them (provide input, receive output).

@@ -46,3 +46,3 @@ ## Getting Started

term.open(document.getElementById('terminal'));
      term.write('Hello from \x1B[1;3;31mxterm.js\x1B[0m $ ')
term.write('Hello from \x1B[1;3;31mxterm.js\x1B[0m $ ')
</script>

@@ -112,13 +112,13 @@ </body>

- [**SourceLair**](https://www.sourcelair.com/): In-browser IDE that provides its users with fully-featured Linux terminals based on xterm.js
- [**Microsoft Visual Studio Code**](http://code.visualstudio.com/): Modern, versatile and powerful open source code editor that provides an integrated terminal based on xterm.js
- [**ttyd**](https://github.com/tsl0922/ttyd): A command-line tool for sharing terminal over the web, with fully-featured terminal emulation based on xterm.js
- [**SourceLair**](https://www.sourcelair.com/): In-browser IDE that provides its users with fully-featured Linux terminals based on xterm.js.
- [**Microsoft Visual Studio Code**](http://code.visualstudio.com/): Modern, versatile and powerful open source code editor that provides an integrated terminal based on xterm.js.
- [**ttyd**](https://github.com/tsl0922/ttyd): A command-line tool for sharing terminal over the web, with fully-featured terminal emulation based on xterm.js.
- [**Katacoda**](https://www.katacoda.com/): Katacoda is an Interactive Learning Platform for software developers, covering the latest Cloud Native technologies.
- [**Eclipse Che**](http://www.eclipse.org/che): Developer workspace server, cloud IDE, and Eclipse next-generation IDE.
- [**Codenvy**](http://www.codenvy.com): Cloud workspaces for development teams.
- [**CoderPad**](https://coderpad.io): Online interviewing platform for programmers. Run code in many programming languages, with results displayed by `xterm.js`.
- [**WebSSH2**](https://github.com/billchurch/WebSSH2): A web based SSH2 client using `xterm.js`, socket.io, and ssh2.
- [**CoderPad**](https://coderpad.io): Online interviewing platform for programmers. Run code in many programming languages, with results displayed by xterm.js.
- [**WebSSH2**](https://github.com/billchurch/WebSSH2): A web based SSH2 client using xterm.js, socket.io, and ssh2.
- [**Spyder Terminal**](https://github.com/spyder-ide/spyder-terminal): A full fledged system terminal embedded on Spyder IDE.
- [**Cloud Commander**](https://cloudcmd.io "Cloud Commander"): Orthodox web file manager with console and editor.
- [**Codevolve**](https://www.codevolve.com "Codevolve"): Online platform for interactive coding and web development courses. Live container-backed terminal uses `xterm.js`.
- [**Codevolve**](https://www.codevolve.com "Codevolve"): Online platform for interactive coding and web development courses. Live container-backed terminal uses xterm.js.
- [**RStudio**](https://www.rstudio.com/products/RStudio "RStudio"): RStudio is an integrated development environment (IDE) for R.

@@ -131,5 +131,4 @@ - [**Terminal for Atom**](https://github.com/jsmecham/atom-terminal-tab): A simple terminal for the Atom text editor.

- [**Portainer**](https://portainer.io): Simple management UI for Docker.
- [**SSHy**](https://github.com/stuicey/SSHy): HTML5 Based SSHv2 Web Client with E2E encryption utilising `xterm.js`, SJCL & websockets.
- [**JupyterLab**](https://github.com/jupyterlab/jupyterlab): An extensible
computational environment for Jupyter, supporting interactive data science and scientific computing across all programming languages.
- [**SSHy**](https://github.com/stuicey/SSHy): HTML5 Based SSHv2 Web Client with E2E encryption utilising xterm.js, SJCL & websockets.
- [**JupyterLab**](https://github.com/jupyterlab/jupyterlab): An extensible computational environment for Jupyter, supporting interactive data science and scientific computing across all programming languages.
- [**Theia**](https://github.com/theia-ide/theia): Theia is a cloud & desktop IDE framework implemented in TypeScript.

@@ -146,8 +145,8 @@ - [**Opshell**](https://github.com/ricktbaker/opshell) Ops Helper tool to make life easier working with AWS instances across multiple organizations.

- [**rtty**](https://github.com/zhaojh329/rtty): A reverse proxy WebTTY. It is composed of the client and the server.
- [**Pisth**](https://github.com/ColdGrub1384/Pisth): An SFTP and SSH client for iOS
- [**Pisth**](https://github.com/ColdGrub1384/Pisth): An SFTP and SSH client for iOS.
- [**abstruse**](https://github.com/bleenco/abstruse): Abstruse CI is a continuous integration platform based on Node.JS and Docker.
- [**Azure Data Studio**](https://github.com/Microsoft/azuredatastudio): A data management tool that enables working with SQL Server, Azure SQL DB and SQL DW from Windows, macOS and Linux.
- [**FreeMAN**](https://github.com/matthew-matvei/freeman): A free, cross-platform file manager for power users
- [**FreeMAN**](https://github.com/matthew-matvei/freeman): A free, cross-platform file manager for power users.
- [**Fluent Terminal**](https://github.com/felixse/FluentTerminal): A terminal emulator based on UWP and web technologies.
- [**Hyper**](https://hyper.is): A terminal built on web technologies
- [**Hyper**](https://hyper.is): A terminal built on web technologies.
- [**Diag**](https://diag.ai): A better way to troubleshoot problems faster. Capture, share and reapply troubleshooting knowledge so you can focus on solving problems that matter.

@@ -157,3 +156,3 @@ - [**GoTTY**](https://github.com/yudai/gotty): A simple command line tool that shares your terminal as a web application based on xterm.js.

- [**cPanel & WHM**](https://cpanel.com): The hosting platform of choice.
- [**Nutanix**](https://github.com/nutanix): Nutanix Enterprise Cloud uses xterm in the webssh functionality within Nutanix Calm, and is also looking to move our old noserial (termjs) functionality to xterm.js
- [**Nutanix**](https://github.com/nutanix): Nutanix Enterprise Cloud uses xterm in the webssh functionality within Nutanix Calm, and is also looking to move our old noserial (termjs) functionality to xterm.js.
- [**SSH Web Client**](https://github.com/roke22/PHP-SSH2-Web-Client): SSH Web Client with PHP.

@@ -163,3 +162,4 @@ - [**Shellvault**](https://www.shellvault.io): The cloud-based SSH terminal you can access from anywhere.

- [**webssh**](https://github.com/huashengdun/webssh): Web based ssh client.
- [**info-beamer hosted**](https://info-beamer.com): Uses Xterm.js to manage digital signage devices from the web dashboard.
- [**info-beamer hosted**](https://info-beamer.com): Uses xterm.js to manage digital signage devices from the web dashboard.
- [**Jumpserver**](https://github.com/jumpserver/luna): Jumpserver Luna project, Jumpserver is a bastion server project, Luna use xterm.js for web terminal emulation.

@@ -174,3 +174,3 @@ [And much more...](https://github.com/xtermjs/xterm.js/network/dependents)

All current and past releases are available on this repo's [Releases page](https://github.com/sourcelair/xterm.js/releases), while a rough roadmap is available by looking through [Milestones](https://github.com/sourcelair/xterm.js/milestones).
All current and past releases are available on this repo's [Releases page](https://github.com/sourcelair/xterm.js/releases), you can view the [high-level roadmap on the wiki](https://github.com/xtermjs/xterm.js/wiki/Roadmap) and see what we're working on now by looking through [Milestones](https://github.com/sourcelair/xterm.js/milestones).

@@ -177,0 +177,0 @@ ## Contributing

@@ -22,2 +22,4 @@ /**

(addonTerminal._core as any).isWinptyCompatEnabled = true;
// Winpty does not support wraparound mode which means that lines will never

@@ -24,0 +26,0 @@ // be marked as wrapped. This causes issues for things like copying a line

@@ -214,3 +214,3 @@ /**

if (this._hasScrollback) {
if (this._isReflowEnabled) {
this._reflow(newCols, newRows);

@@ -230,2 +230,6 @@

private get _isReflowEnabled(): boolean {
return this._hasScrollback && !(this._terminal as any).isWinptyCompatEnabled;
}
private _reflow(newCols: number, newRows: number): void {

@@ -238,3 +242,3 @@ if (this._cols === newCols) {

if (newCols > this._cols) {
this._reflowLarger(newCols);
this._reflowLarger(newCols, newRows);
} else {

@@ -245,3 +249,3 @@ this._reflowSmaller(newCols, newRows);

private _reflowLarger(newCols: number): void {
private _reflowLarger(newCols: number, newRows: number): void {
const toRemove: number[] = reflowLargerGetLinesToRemove(this.lines, newCols, this.ybase + this.y);

@@ -251,7 +255,7 @@ if (toRemove.length > 0) {

reflowLargerApplyNewLayout(this.lines, newLayoutResult.layout);
this._reflowLargerAdjustViewport(newCols, newLayoutResult.countRemoved);
this._reflowLargerAdjustViewport(newCols, newRows, newLayoutResult.countRemoved);
}
}
private _reflowLargerAdjustViewport(newCols: number, countRemoved: number): void {
private _reflowLargerAdjustViewport(newCols: number, newRows: number, countRemoved: number): void {
// Adjust viewport based on number of items removed

@@ -264,3 +268,3 @@ let viewportAdjustments = countRemoved;

}
if (this.lines.length < this._rows) {
if (this.lines.length < newRows) {
// Add an extra row at the bottom of the viewport

@@ -369,3 +373,3 @@ this.lines.push(new BufferLine(newCols, FILL_CHAR_DATA));

if (this.ybase === 0) {
if (this.y < this._rows - 1) {
if (this.y < newRows - 1) {
this.y++;

@@ -372,0 +376,0 @@ this.lines.pop();

@@ -206,2 +206,4 @@ /**

this._compositionView.style.lineHeight = cellHeight + 'px';
this._compositionView.style.fontFamily = this._terminal.options.fontFamily;
this._compositionView.style.fontSize = this._terminal.options.fontSize + 'px';
// Sync the textarea to the exact position of the composition view so the IME knows where the

@@ -208,0 +210,0 @@ // text is.

@@ -244,3 +244,3 @@ /**

x * this._scaledCellWidth + this._scaledCharLeft,
(y + 0.5) * this._scaledCellHeight + this._scaledCharTop);
y * this._scaledCellHeight + this._scaledCharTop + this._scaledCharHeight / 2);
}

@@ -320,3 +320,3 @@

x * this._scaledCellWidth + this._scaledCharLeft,
(y + 0.5) * this._scaledCellHeight + this._scaledCharTop);
y * this._scaledCellHeight + this._scaledCharTop + this._scaledCharHeight / 2);
this._ctx.restore();

@@ -323,0 +323,0 @@ }

@@ -73,3 +73,3 @@ /**

if ('IntersectionObserver' in window) {
const observer = new IntersectionObserver(e => this.onIntersectionChange(e[0]), { threshold: 0 });
const observer = new IntersectionObserver(e => this.onIntersectionChange(e[e.length - 1]), { threshold: 0 });
observer.observe(this._terminal.element);

@@ -76,0 +76,0 @@ this.register({ dispose: () => observer.disconnect() });

@@ -58,2 +58,3 @@ /**

if (!start || !end) {
this._clearState();
return;

@@ -60,0 +61,0 @@ }

@@ -67,6 +67,8 @@ /**

/**
* The number of writes to perform in a single batch before allowing the
* renderer to catch up with a 0ms setTimeout.
* The max number of ms to spend on writes before allowing the renderer to
* catch up with a 0ms setTimeout. A value of < 33 to keep us close to
* 30fps, and a value of < 16 to try to run at 60fps. Of course, the real FPS
* depends on the time it takes for the renderer to draw the frame.
*/
const WRITE_BATCH_SIZE = 300;
const WRITE_TIMEOUT_MS = 12;

@@ -742,2 +744,7 @@ const MINIMUM_COLS = 2; // Less than 2 can mess with wide chars

this.element.classList.toggle('enable-mouse-events', this.mouseEvents);
if (this.mouseEvents) {
this.selectionManager.disable();
} else {
this.selectionManager.enable();
}

@@ -1348,3 +1355,3 @@ if (this.options.screenReaderMode) {

protected _innerWrite(): void {
protected _innerWrite(bufferOffset: number = 0): void {
// Ensure the terminal isn't disposed

@@ -1355,9 +1362,10 @@ if (this._isDisposed) {

const writeBatch = this.writeBuffer.splice(0, WRITE_BATCH_SIZE);
while (writeBatch.length > 0) {
const data = writeBatch.shift();
const startTime = Date.now();
while (this.writeBuffer.length > bufferOffset) {
const data = this.writeBuffer[bufferOffset];
bufferOffset++;
// If XOFF was sent in order to catch up with the pty process, resume it if
// the writeBuffer is empty to allow more data to come in.
if (this._xoffSentToCatchUp && writeBatch.length === 0 && this.writeBuffer.length === 0) {
// we reached the end of the writeBuffer to allow more data to come in.
if (this._xoffSentToCatchUp && this.writeBuffer.length === bufferOffset) {
this.handler(C0.DC1);

@@ -1380,8 +1388,13 @@ this._xoffSentToCatchUp = false;

this.refresh(this._refreshStart, this._refreshEnd);
if (Date.now() - startTime >= WRITE_TIMEOUT_MS) {
break;
}
}
if (this.writeBuffer.length > 0) {
if (this.writeBuffer.length > bufferOffset) {
// Allow renderer to catch up before processing the next batch
setTimeout(() => this._innerWrite(), 0);
setTimeout(() => this._innerWrite(bufferOffset), 0);
} else {
this._writeInProgress = false;
this.writeBuffer = [];
}

@@ -1388,0 +1401,0 @@ }

@@ -26,2 +26,3 @@ /**

private _mouseMoveListener: (e: MouseEvent) => any;
private _mouseLeaveListener: (e: MouseEvent) => any;
private _clickListener: (e: MouseEvent) => any;

@@ -42,2 +43,3 @@

this._mouseMoveListener = e => this._onMouseMove(e);
this._mouseLeaveListener = e => this._onMouseLeave(e);
this._clickListener = e => this._onClick(e);

@@ -94,2 +96,3 @@ }

this._terminal.element.addEventListener('mousemove', this._mouseMoveListener);
this._terminal.element.addEventListener('mouseleave', this._mouseLeaveListener);
this._terminal.element.addEventListener('click', this._clickListener);

@@ -103,2 +106,3 @@ }

this._terminal.element.removeEventListener('mousemove', this._mouseMoveListener);
this._terminal.element.removeEventListener('mouseleave', this._mouseLeaveListener);
this._terminal.element.removeEventListener('click', this._clickListener);

@@ -176,2 +180,14 @@ }

private _onMouseLeave(e: MouseEvent): void {
// Fire the hover end callback and cancel any existing timer if the mouse
// leaves the terminal element
if (this._currentZone) {
this._currentZone.leaveCallback();
this._currentZone = null;
if (this._tooltipTimeout) {
clearTimeout(this._tooltipTimeout);
}
}
}
private _onClick(e: MouseEvent): void {

@@ -178,0 +194,0 @@ // Find the active zone and click it if found

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc