Merge pull request #5328 from Tyriar/5327_scroll
Refresh viewport after clear or ED
This commit is contained in:
@@ -532,7 +532,13 @@ export class CoreBrowserTerminal extends CoreTerminal implements ITerminal {
|
|||||||
this.textarea!.focus();
|
this.textarea!.focus();
|
||||||
this.textarea!.select();
|
this.textarea!.select();
|
||||||
}));
|
}));
|
||||||
this._register(this._onScroll.event(() => this._selectionService!.refresh()));
|
this._register(Event.any(
|
||||||
|
this._onScroll.event,
|
||||||
|
this._inputHandler.onScroll
|
||||||
|
)(() => {
|
||||||
|
this._selectionService!.refresh();
|
||||||
|
this._viewport?.queueSync();
|
||||||
|
}));
|
||||||
|
|
||||||
this._register(this._instantiationService.createInstance(BufferDecorationRenderer, this.screenElement));
|
this._register(this._instantiationService.createInstance(BufferDecorationRenderer, this.screenElement));
|
||||||
this._register(addDisposableListener(this.element, 'mousedown', (e: MouseEvent) => this._selectionService!.handleMouseDown(e)));
|
this._register(addDisposableListener(this.element, 'mousedown', (e: MouseEvent) => this._selectionService!.handleMouseDown(e)));
|
||||||
|
|||||||
@@ -93,8 +93,8 @@ export class Viewport extends Disposable {
|
|||||||
].join('\n');
|
].join('\n');
|
||||||
}));
|
}));
|
||||||
|
|
||||||
this._register(this._bufferService.onResize(() => this._queueSync()));
|
this._register(this._bufferService.onResize(() => this.queueSync()));
|
||||||
this._register(this._bufferService.buffers.onBufferActivate(() => this._queueSync()));
|
this._register(this._bufferService.buffers.onBufferActivate(() => this.queueSync()));
|
||||||
this._register(this._bufferService.onScroll(() => this._sync()));
|
this._register(this._bufferService.onScroll(() => this._sync()));
|
||||||
|
|
||||||
this._register(this._scrollableElement.onScroll(e => this._handleScroll(e)));
|
this._register(this._scrollableElement.onScroll(e => this._handleScroll(e)));
|
||||||
@@ -126,7 +126,7 @@ export class Viewport extends Disposable {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
private _queueSync(ydisp?: number): void {
|
public queueSync(ydisp?: number): void {
|
||||||
// Update state
|
// Update state
|
||||||
if (ydisp !== undefined) {
|
if (ydisp !== undefined) {
|
||||||
this._latestYDisp = ydisp;
|
this._latestYDisp = ydisp;
|
||||||
|
|||||||
Reference in New Issue
Block a user