mirror of
https://github.com/wavetermdev/xterm.js.git
synced 2026-08-05 13:43:48 -07:00
fix dom renderer
This commit is contained in:
+4
-2
@@ -121,8 +121,9 @@ export class BufferLine implements IBufferLine {
|
||||
|
||||
public translateToString(trimRight: boolean = false, startCol: number = 0, endCol: number = null): string {
|
||||
let length = endCol || this.length;
|
||||
if (trimRight)
|
||||
if (trimRight) {
|
||||
length = Math.min(length, this.getTrimmedLength());
|
||||
}
|
||||
let result = '';
|
||||
while (startCol < length) {
|
||||
result += this.get(startCol)[CHAR_DATA_CHAR_INDEX] || ' ';
|
||||
@@ -313,8 +314,9 @@ export class BufferLineTypedArray implements IBufferLine {
|
||||
|
||||
public translateToString(trimRight: boolean = false, startCol: number = 0, endCol: number = null): string {
|
||||
let length = endCol || this.length;
|
||||
if (trimRight)
|
||||
if (trimRight) {
|
||||
length = Math.min(length, this.getTrimmedLength());
|
||||
}
|
||||
let result = '';
|
||||
while (startCol < length) {
|
||||
const stringData = this._data[startCol * CELL_SIZE + Cell.STRING];
|
||||
|
||||
@@ -31,7 +31,7 @@ export class DomRendererRowFactory {
|
||||
}
|
||||
|
||||
const charData = lineData.get(x);
|
||||
const char: string = charData[CHAR_DATA_CHAR_INDEX];
|
||||
const char: string = charData[CHAR_DATA_CHAR_INDEX] || ' ';
|
||||
const attr: number = charData[CHAR_DATA_ATTR_INDEX];
|
||||
const width: number = charData[CHAR_DATA_WIDTH_INDEX];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user