mirror of
https://github.com/wavetermdev/xterm.js.git
synced 2026-08-05 13:43:48 -07:00
Only show char codes for parsing data on trace
This commit is contained in:
@@ -444,12 +444,11 @@ export class InputHandler extends Disposable implements IInputHandler {
|
||||
}
|
||||
|
||||
// Log debug data, the log level gate is to prevent extra work in this hot path
|
||||
if (this._logService.logLevel <= LogLevelEnum.DEBUG) {
|
||||
this._logService.debug(`parsing data${typeof data === 'string' ? ` "${data}"` : ` "${Array.prototype.map.call(data, e => String.fromCharCode(e)).join('')}"`}`, typeof data === 'string'
|
||||
? data.split('').map(e => e.charCodeAt(0))
|
||||
: data
|
||||
);
|
||||
}
|
||||
this._logService.debug(`parsing data ${typeof data === 'string' ? ` "${data}"` : ` "${Array.prototype.map.call(data, e => String.fromCharCode(e)).join('')}"`}`);
|
||||
this._logService.trace(`parsing data (codes)`, () => typeof data === 'string'
|
||||
? data.split('').map(e => e.charCodeAt(0))
|
||||
: Array.from(data)
|
||||
);
|
||||
|
||||
// resize input buffer if needed
|
||||
if (this._parseBuffer.length < data.length) {
|
||||
@@ -606,7 +605,7 @@ export class InputHandler extends Disposable implements IInputHandler {
|
||||
// since an empty cell is only set by fullwidth chars
|
||||
bufferRow.addCodepointToCell(this._activeBuffer.x - offset,
|
||||
code, chWidth);
|
||||
for (let delta = chWidth - oldWidth; --delta >= 0; ) {
|
||||
for (let delta = chWidth - oldWidth; --delta >= 0;) {
|
||||
bufferRow.setCellFromCodepoint(this._activeBuffer.x++, 0, 0, curAttr);
|
||||
}
|
||||
continue;
|
||||
@@ -1622,7 +1621,7 @@ export class InputHandler extends Disposable implements IInputHandler {
|
||||
const text = bufferRow.getString(x);
|
||||
const data = new Uint32Array(text.length * length);
|
||||
let idata = 0;
|
||||
for (let itext = 0; itext < text.length; ) {
|
||||
for (let itext = 0; itext < text.length;) {
|
||||
const ch = text.codePointAt(itext) || 0;
|
||||
data[idata++] = ch;
|
||||
itext += ch > 0xffff ? 2 : 1;
|
||||
|
||||
Reference in New Issue
Block a user