Support smooth scroll

This commit is contained in:
Daniel Imms
2024-07-10 12:32:55 -07:00
parent 2b8ccb5e51
commit 55c627572c
3 changed files with 72 additions and 18 deletions
+1 -6
View File
@@ -133,15 +133,10 @@ export abstract class CoreTerminal extends Disposable implements ICoreTerminal {
this.register(this.coreService.onRequestScrollToBottom(() => this.scrollToBottom()));
this.register(this.coreService.onUserInput(() => this._writeBuffer.handleUserInput()));
this.register(this.optionsService.onMultipleOptionChange(['windowsMode', 'windowsPty'], () => this._handleWindowsPtyOptionChange()));
this.register(this._bufferService.onScroll(event => {
this.register(this._bufferService.onScroll(() => {
this._onScroll.fire({ position: this._bufferService.buffer.ydisp });
this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop, this._bufferService.buffer.scrollBottom);
}));
this.register(this._inputHandler.onScroll(event => {
this._onScroll.fire({ position: this._bufferService.buffer.ydisp });
this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop, this._bufferService.buffer.scrollBottom);
}));
// Setup WriteBuffer
this._writeBuffer = this.register(new WriteBuffer((data, promiseResult) => this._inputHandler.parse(data, promiseResult)));
this.register(forwardEvent(this._writeBuffer.onWriteParsed, this._onWriteParsed));