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
|
// 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('')}"`}`);
|
||||||
this._logService.debug(`parsing data${typeof data === 'string' ? ` "${data}"` : ` "${Array.prototype.map.call(data, e => String.fromCharCode(e)).join('')}"`}`, typeof data === 'string'
|
this._logService.trace(`parsing data (codes)`, () => typeof data === 'string'
|
||||||
? data.split('').map(e => e.charCodeAt(0))
|
? data.split('').map(e => e.charCodeAt(0))
|
||||||
: data
|
: Array.from(data)
|
||||||
);
|
);
|
||||||
}
|
|
||||||
|
|
||||||
// resize input buffer if needed
|
// resize input buffer if needed
|
||||||
if (this._parseBuffer.length < data.length) {
|
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
|
// since an empty cell is only set by fullwidth chars
|
||||||
bufferRow.addCodepointToCell(this._activeBuffer.x - offset,
|
bufferRow.addCodepointToCell(this._activeBuffer.x - offset,
|
||||||
code, chWidth);
|
code, chWidth);
|
||||||
for (let delta = chWidth - oldWidth; --delta >= 0; ) {
|
for (let delta = chWidth - oldWidth; --delta >= 0;) {
|
||||||
bufferRow.setCellFromCodepoint(this._activeBuffer.x++, 0, 0, curAttr);
|
bufferRow.setCellFromCodepoint(this._activeBuffer.x++, 0, 0, curAttr);
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
@@ -1622,7 +1621,7 @@ export class InputHandler extends Disposable implements IInputHandler {
|
|||||||
const text = bufferRow.getString(x);
|
const text = bufferRow.getString(x);
|
||||||
const data = new Uint32Array(text.length * length);
|
const data = new Uint32Array(text.length * length);
|
||||||
let idata = 0;
|
let idata = 0;
|
||||||
for (let itext = 0; itext < text.length; ) {
|
for (let itext = 0; itext < text.length;) {
|
||||||
const ch = text.codePointAt(itext) || 0;
|
const ch = text.codePointAt(itext) || 0;
|
||||||
data[idata++] = ch;
|
data[idata++] = ch;
|
||||||
itext += ch > 0xffff ? 2 : 1;
|
itext += ch > 0xffff ? 2 : 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user