mirror of
https://github.com/wavetermdev/xterm.js.git
synced 2026-08-05 13:43:48 -07:00
Polish
This commit is contained in:
@@ -38,7 +38,6 @@ export class CircularList<T> {
|
||||
}
|
||||
|
||||
public set length(newLength: number) {
|
||||
// TODO: Is this auto fill is needed or can it be
|
||||
if (newLength > this._length) {
|
||||
for (let i = this._length; i < newLength; i++) {
|
||||
this._array[i] = undefined;
|
||||
|
||||
+2
-3
@@ -3706,6 +3706,7 @@ Terminal.prototype.insertLines = function(params) {
|
||||
|
||||
while (param--) {
|
||||
if (this.lines.length === this.lines.maxLength) {
|
||||
// Trim the start of lines to make room for the new line
|
||||
this.lines.trimStart(1);
|
||||
this.ybase--;
|
||||
this.ydisp--;
|
||||
@@ -3740,9 +3741,7 @@ Terminal.prototype.deleteLines = function(params) {
|
||||
|
||||
while (param--) {
|
||||
if (this.lines.length === this.lines.maxLength) {
|
||||
// Trim the start of lines to make room for the new temporary row
|
||||
// TODO: This section could be optimized by introducing a CircularList function that inserts,
|
||||
// deletes and shifts elements to accomplish this task.
|
||||
// Trim the start of lines to make room for the new line
|
||||
this.lines.trimStart(1);
|
||||
this.ybase -= 1;
|
||||
this.ydisp -= 1;
|
||||
|
||||
Reference in New Issue
Block a user