mirror of
https://github.com/wavetermdev/xterm.js.git
synced 2026-08-05 13:43:48 -07:00
Don't resize when unnecessary
This commit is contained in:
+6
-2
@@ -2585,6 +2585,10 @@
|
||||
, j
|
||||
, ch;
|
||||
|
||||
if (x === this.cols && y === this.rows) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (x < 1) x = 1;
|
||||
if (y < 1) y = 1;
|
||||
|
||||
@@ -2598,7 +2602,7 @@
|
||||
this.lines[i].push(ch);
|
||||
}
|
||||
}
|
||||
} else if (j > x) {
|
||||
} else { // (j > x)
|
||||
i = this.lines.length;
|
||||
while (i--) {
|
||||
while (this.lines[i].length > x) {
|
||||
@@ -2621,7 +2625,7 @@
|
||||
this.insertRow();
|
||||
}
|
||||
}
|
||||
} else if (j > y) {
|
||||
} else { // (j > y)
|
||||
while (j-- > y) {
|
||||
if (this.lines.length > y + this.ybase) {
|
||||
this.lines.shift();
|
||||
|
||||
Reference in New Issue
Block a user