diff --git a/addons/addon-webgl/src/GlyphRenderer.ts b/addons/addon-webgl/src/GlyphRenderer.ts index 4117525c48..be1990c2a6 100644 --- a/addons/addon-webgl/src/GlyphRenderer.ts +++ b/addons/addon-webgl/src/GlyphRenderer.ts @@ -389,8 +389,9 @@ export class GlyphRenderer extends Disposable { gl.bindTexture(gl.TEXTURE_2D, this._atlasTextures[i].texture); gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE); gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE); + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR); + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR); gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, atlas.pages[i].canvas); - gl.generateMipmap(gl.TEXTURE_2D); this._atlasTextures[i].version = atlas.pages[i].version; } diff --git a/src/browser/services/CharacterJoinerService.ts b/src/browser/services/CharacterJoinerService.ts index e1da0bd281..2cf3bd506b 100644 --- a/src/browser/services/CharacterJoinerService.ts +++ b/src/browser/services/CharacterJoinerService.ts @@ -100,6 +100,7 @@ export class CharacterJoinerService implements ICharacterJoinerService { const ranges: [number, number][] = []; const lineStr = line.translateToString(true); + const trimmedLength = line.getTrimmedLength(); // Because some cells can be represented by multiple javascript characters, // we track the cell and the string indexes separately. This allows us to @@ -111,7 +112,7 @@ export class CharacterJoinerService implements ICharacterJoinerService { let rangeAttrFG = line.getFg(0); let rangeAttrBG = line.getBg(0); - for (let x = 0; x < line.getTrimmedLength(); x++) { + for (let x = 0; x < trimmedLength; x++) { line.loadCell(x, this._workCell); if (this._workCell.getWidth() === 0) { @@ -147,7 +148,7 @@ export class CharacterJoinerService implements ICharacterJoinerService { } // Process any trailing ranges. - if (this._bufferService.cols - rangeStartColumn > 1) { + if (trimmedLength - rangeStartColumn > 1) { const joinedRanges = this._getJoinedRanges( lineStr, rangeStartStringIndex, @@ -216,7 +217,8 @@ export class CharacterJoinerService implements ICharacterJoinerService { return; } - for (let x = startCol; x < this._bufferService.cols; x++) { + const trimmedLength = line.getTrimmedLength(); + for (let x = startCol; x < trimmedLength; x++) { const width = line.getWidth(x); const length = line.getString(x).length || WHITESPACE_CELL_CHAR.length; @@ -264,7 +266,7 @@ export class CharacterJoinerService implements ICharacterJoinerService { // If there is still a range left at the end, it must extend all the way to // the end of the line. if (currentRange) { - currentRange[1] = this._bufferService.cols; + currentRange[1] = trimmedLength; } }