Add scrollToBottom

This commit is contained in:
Daniel Imms
2016-10-09 13:19:11 -07:00
parent 941e57a218
commit e5d130b698
2 changed files with 42 additions and 0 deletions
+8
View File
@@ -1315,6 +1315,14 @@ Terminal.prototype.scrollPages = function(pageCount) {
this.scrollDisp(pageCount * (this.rows - 1));
}
Terminal.prototype.scrollToTop = function() {
this.scrollDisp(-this.ydisp);
}
Terminal.prototype.scrollToBottom = function() {
this.scrollDisp(this.ybase - this.ydisp);
}
/**
* Writes text to the terminal.
* @param {string} text The text to write to the terminal.