Remove unused function
This commit is contained in:
@@ -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).
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user