Implement scrollPages

This commit is contained in:
Daniel Imms
2016-10-09 12:51:58 -07:00
parent 76a890aa74
commit fe0d878b23
2 changed files with 14 additions and 0 deletions
+8
View File
@@ -1307,6 +1307,14 @@ Terminal.prototype.scrollDisp = function(disp, suppressScrollEvent) {
this.refresh(0, this.rows - 1);
};
/**
* Scroll the display of the terminal by a number of pages.
* @param {number} pageCount The number of pages to scroll.
*/
Terminal.prototype.scrollPages = function(pageCount) {
this.scrollDisp(pageCount * (this.rows - 1));
}
/**
* Writes text to the terminal.
* @param {string} text The text to write to the terminal.
+6
View File
@@ -88,6 +88,12 @@ describe('xterm.js', function() {
});
});
describe('scrollDisp', function() {
it('should scroll a single line', function() {
assert.equal(xterm.ydisp, -1);
});
});
describe('evaluateKeyEscapeSequence', function() {
it('should return the correct escape sequence for unmodified keys', function() {
// Backspace