Remove unused function

This commit is contained in:
Daniel Imms
2018-01-27 17:51:43 -08:00
parent 5506af5322
commit 0bdf1e8265
2 changed files with 0 additions and 23 deletions
-22
View File
@@ -1187,28 +1187,6 @@ export class Terminal extends EventEmitter implements ITerminal, IInputHandlingT
this.refresh(0, this.rows - 1);
}
/**
* Scroll the viewport to an absolute row in the buffer.
* @param absoluteRow The absolute row in the buffer to scroll to.
* @returns The actual absolute row that was scrolled to (including boundary checked).
*/
public scrollToRow(absoluteRow: number): number {
// Ensure value is valid
absoluteRow = Math.max(Math.min(absoluteRow, this.buffer.lines.length - 1), 0);
// Move viewport as necessary
const relativeRow = absoluteRow - this.buffer.ydisp;
let scrollAmount = 0;
if (relativeRow < 0) {
scrollAmount = relativeRow;
} else if (relativeRow >= this.rows) {
scrollAmount = relativeRow - this.rows + 1;
}
this.scrollLines(scrollAmount);
return absoluteRow;
}
/**
* Scroll the display of the terminal by a number of pages.
* @param {number} pageCount The number of pages to scroll (negative scrolls up).
-1
View File
@@ -197,7 +197,6 @@ export interface ITerminal extends PublicTerminal, IElementAccessor, IBufferAcce
*/
handler(data: string): void;
scrollLines(disp: number, suppressScrollEvent?: boolean): void;
scrollToRow(row: number): number;
cancel(ev: Event, force?: boolean): boolean | void;
log(text: string): void;
showCursor(): void;