Implement scrollPages
This commit is contained in:
@@ -1307,6 +1307,14 @@ Terminal.prototype.scrollDisp = function(disp, suppressScrollEvent) {
|
|||||||
this.refresh(0, this.rows - 1);
|
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.
|
* Writes text to the terminal.
|
||||||
* @param {string} text The text to write to the terminal.
|
* @param {string} text The text to write to the terminal.
|
||||||
|
|||||||
@@ -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() {
|
describe('evaluateKeyEscapeSequence', function() {
|
||||||
it('should return the correct escape sequence for unmodified keys', function() {
|
it('should return the correct escape sequence for unmodified keys', function() {
|
||||||
// Backspace
|
// Backspace
|
||||||
|
|||||||
Reference in New Issue
Block a user