Implement smooth scroll for pages/top/bottom, add viewport request event
This commit is contained in:
@@ -296,6 +296,8 @@ export class MockRenderer implements IRenderer {
|
||||
}
|
||||
|
||||
export class MockViewport implements IViewport {
|
||||
private readonly _onRequestScrollLines = new EventEmitter<{ amount: number, suppressScrollEvent: boolean }>();
|
||||
public readonly onRequestScrollLines = this._onRequestScrollLines.event;
|
||||
public dispose(): void {
|
||||
throw new Error('Method not implemented.');
|
||||
}
|
||||
@@ -319,7 +321,9 @@ export class MockViewport implements IViewport {
|
||||
public getBufferElements(startLine: number, endLine?: number | undefined): { bufferElements: HTMLElement[], cursorElement?: HTMLElement | undefined } {
|
||||
throw new Error('Method not implemented.');
|
||||
}
|
||||
public scrollLines(disp: number): void { }
|
||||
public scrollLines(disp: number): void {
|
||||
this._onRequestScrollLines.fire({ amount: disp, suppressScrollEvent: false });
|
||||
}
|
||||
}
|
||||
|
||||
export class MockCompositionHelper implements ICompositionHelper {
|
||||
|
||||
Reference in New Issue
Block a user