Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion addons/addon-webgl/src/GlyphRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
10 changes: 6 additions & 4 deletions src/browser/services/CharacterJoinerService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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) {
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -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;
}
}

Expand Down
Loading