Skip to content

Commit

Permalink
Resize the internal rows after resize and prevent rubbish from remaining
Browse files Browse the repository at this point in the history
  • Loading branch information
sedwards2009 committed Oct 8, 2019
1 parent 3ea5a2f commit e2989dc
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions extraterm/src/render_process/emulator/Term.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2328,19 +2328,18 @@ export class Emulator implements EmulatorApi {
const newrows = Math.max(newSize.rows, 1);

// resize cols
if (this.cols < newcols) {
for (let i = 0; i< this.lines.length; i++) {
const line = this.lines[i];
const newLine = new LineImpl(newcols, 1);
newLine.pasteGrid(line, 0, 0);
for (let i = 0; i< this.lines.length; i++) {
const line = this.lines[i];
const newLine = new LineImpl(newcols, 1);
newLine.pasteGrid(line, 0, 0);

for(let j=line.width; j<newcols; j++) {
newLine.setCell(j, 0, Emulator.defAttr);
}

this.lines[i] = newLine;
for(let j=line.width; j<newcols; j++) {
newLine.setCell(j, 0, Emulator.defAttr);
}

this.lines[i] = newLine;
}

this.setupStops(newcols);
this.cols = newcols;

Expand Down

0 comments on commit e2989dc

Please sign in to comment.