@xterm/xterm 6.1.0-beta.245 → 6.1.0-beta.246

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@xterm/xterm",
3
3
  "description": "Full xterm terminal, in your browser",
4
- "version": "6.1.0-beta.245",
4
+ "version": "6.1.0-beta.246",
5
5
  "main": "lib/xterm.js",
6
6
  "module": "lib/xterm.mjs",
7
7
  "style": "css/xterm.css",
@@ -111,5 +111,5 @@
111
111
  "ws": "^8.2.3",
112
112
  "xterm-benchmark": "^0.3.1"
113
113
  },
114
- "commit": "72941247360141abafa3e9db1261aa2bf6bf8af6"
114
+ "commit": "be339bf796235821abf884ff4c6384e82058c6de"
115
115
  }
@@ -6,4 +6,4 @@
6
6
  /**
7
7
  * The xterm.js version. This is updated by the publish script from package.json.
8
8
  */
9
- export const XTERM_VERSION = '6.1.0-beta.245';
9
+ export const XTERM_VERSION = '6.1.0-beta.246';
@@ -225,12 +225,7 @@ export class DecorationLineCache extends Disposable {
225
225
  if (newLine < 0) {
226
226
  continue;
227
227
  }
228
- const existing = newMap.get(newLine);
229
- if (existing) {
230
- existing.push(...bucket);
231
- } else {
232
- newMap.set(newLine, bucket.slice());
233
- }
228
+ this._mergeLineBucket(newMap, newLine, bucket);
234
229
  }
235
230
  this._decorationsByLine.clear();
236
231
  for (const [line, bucket] of newMap) {
@@ -254,7 +249,9 @@ export class DecorationLineCache extends Disposable {
254
249
  private _mergeLineBucket(newMap: Map<number, IInternalDecoration[]>, line: number, bucket: IInternalDecoration[]): void {
255
250
  const existing = newMap.get(line);
256
251
  if (existing) {
257
- existing.push(...bucket);
252
+ for (let i = 0, len = bucket.length; i < len; i++) {
253
+ existing.push(bucket[i]);
254
+ }
258
255
  } else {
259
256
  newMap.set(line, bucket.slice());
260
257
  }