feat: streams, 'clear' command
This commit is contained in:
@@ -43,6 +43,7 @@ export class Terminal {
|
||||
paragraph.className = 'line'
|
||||
|
||||
this.terminal.appendChild(paragraph)
|
||||
this.UpdateLines()
|
||||
paragraph.scrollIntoView({behavior: 'smooth'})
|
||||
}
|
||||
|
||||
@@ -70,10 +71,8 @@ export class Terminal {
|
||||
const selector = `#line-${this.cursorPosition.row} .cell-${this.cursorPosition.col}`
|
||||
|
||||
// adjust for the cursor
|
||||
console.log(`going from ${this.terminal.children.length - 1} to ${this.cursorPosition.row}`)
|
||||
if (!document.querySelector(`#line-${this.cursorPosition.row}`)) {
|
||||
for (let i = this.terminal.children.length - 1; i < this.cursorPosition.row; i++) {
|
||||
console.log(i)
|
||||
this.AppendLine()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user