@xterm/xterm 6.1.0-beta.244 → 6.1.0-beta.245
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/lib/xterm.js +1 -1
- package/lib/xterm.js.map +1 -1
- package/lib/xterm.mjs +8 -8
- package/lib/xterm.mjs.map +4 -4
- package/package.json +2 -2
- package/src/common/Version.ts +1 -1
- package/src/common/buffer/BufferLine.ts +6 -2
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.
|
|
4
|
+
"version": "6.1.0-beta.245",
|
|
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": "
|
|
114
|
+
"commit": "72941247360141abafa3e9db1261aa2bf6bf8af6"
|
|
115
115
|
}
|
package/src/common/Version.ts
CHANGED
|
@@ -8,6 +8,7 @@ import { AttributeData } from 'common/buffer/AttributeData';
|
|
|
8
8
|
import { CellData } from 'common/buffer/CellData';
|
|
9
9
|
import { Attributes, BgFlags, CHAR_DATA_ATTR_INDEX, CHAR_DATA_CHAR_INDEX, CHAR_DATA_WIDTH_INDEX, Content, NULL_CELL_CHAR, NULL_CELL_CODE, NULL_CELL_WIDTH, WHITESPACE_CELL_CHAR } from 'common/buffer/Constants';
|
|
10
10
|
import { stringFromCodePoint } from 'common/input/TextDecoder';
|
|
11
|
+
import { StringBuilder } from 'common/StringBuilder';
|
|
11
12
|
|
|
12
13
|
// Buffer memory layout:
|
|
13
14
|
//
|
|
@@ -41,6 +42,7 @@ export const DEFAULT_ATTR_DATA = Object.freeze(new AttributeData());
|
|
|
41
42
|
// Work variables to avoid garbage collection
|
|
42
43
|
let $startIndex = 0;
|
|
43
44
|
const $workCell = new CellData();
|
|
45
|
+
const $translateToStringBuilder = new StringBuilder();
|
|
44
46
|
|
|
45
47
|
export interface IBufferLineStringCacheEntry {
|
|
46
48
|
value: string | undefined;
|
|
@@ -570,12 +572,12 @@ export class BufferLine implements IBufferLine {
|
|
|
570
572
|
if (outColumns) {
|
|
571
573
|
outColumns.length = 0;
|
|
572
574
|
}
|
|
573
|
-
|
|
575
|
+
$translateToStringBuilder.reset();
|
|
574
576
|
while (startCol < endCol) {
|
|
575
577
|
const content = this._data[startCol * Constants.CELL_INDICIES + Cell.CONTENT];
|
|
576
578
|
const cp = content & Content.CODEPOINT_MASK;
|
|
577
579
|
const chars = (content & Content.IS_COMBINED_MASK) ? this._combined[startCol] : (cp) ? stringFromCodePoint(cp) : WHITESPACE_CELL_CHAR;
|
|
578
|
-
|
|
580
|
+
$translateToStringBuilder.append(chars);
|
|
579
581
|
if (outColumns) {
|
|
580
582
|
for (let i = 0; i < chars.length; ++i) {
|
|
581
583
|
outColumns.push(startCol);
|
|
@@ -586,6 +588,8 @@ export class BufferLine implements IBufferLine {
|
|
|
586
588
|
if (outColumns) {
|
|
587
589
|
outColumns.push(startCol);
|
|
588
590
|
}
|
|
591
|
+
const result = $translateToStringBuilder.toString();
|
|
592
|
+
$translateToStringBuilder.reset();
|
|
589
593
|
if (isCanonicalRequest) {
|
|
590
594
|
const cacheEntry = this._getStringCacheEntry(true)!;
|
|
591
595
|
cacheEntry.value = result;
|