mirror of
https://github.com/wavetermdev/xterm.js.git
synced 2026-08-05 13:43:48 -07:00
Fix insertLines as max buffer size
This commit is contained in:
+5
-6
@@ -3086,7 +3086,7 @@ Terminal.prototype.eraseLine = function(y) {
|
||||
|
||||
|
||||
/**
|
||||
* Return the data array of a blank line/
|
||||
* Return the data array of a blank line
|
||||
* @param {number} cur First bunch of data for each "blank" character.
|
||||
*/
|
||||
Terminal.prototype.blankLine = function(cur) {
|
||||
@@ -3706,12 +3706,11 @@ 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 temporary row
|
||||
// TODO: This section could be optimized by introducing a CircularList function that inserts,
|
||||
// deletes and shifts elements to accomplish this task.
|
||||
this.lines.trimStart(1);
|
||||
this.ybase -= 1;
|
||||
this.ydisp -= 1;
|
||||
this.ybase--;
|
||||
this.ydisp--;
|
||||
row--;
|
||||
j--;
|
||||
}
|
||||
// test: echo -e '\e[44m\e[1L\e[0m'
|
||||
// blankLine(true) - xterm/linux behavior
|
||||
|
||||
Reference in New Issue
Block a user