From 0bdf1e82656c4ec508f5072d7536d5db7152ef8e Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Sat, 27 Jan 2018 17:51:43 -0800 Subject: [PATCH] Remove unused function --- src/Terminal.ts | 22 ---------------------- src/Types.ts | 1 - 2 files changed, 23 deletions(-) diff --git a/src/Terminal.ts b/src/Terminal.ts index e9116a2214..4eafc7a043 100644 --- a/src/Terminal.ts +++ b/src/Terminal.ts @@ -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). diff --git a/src/Types.ts b/src/Types.ts index 0b877930a6..2500d73cb1 100644 --- a/src/Types.ts +++ b/src/Types.ts @@ -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;