mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-08 17:19:48 +01:00
Update the height only after processing all the change events (#42317)
This commit is contained in:
@@ -75,15 +75,12 @@ export class ViewLayout extends Disposable implements IViewLayout {
|
||||
}
|
||||
public onFlushed(lineCount: number): void {
|
||||
this._linesLayout.onFlushed(lineCount);
|
||||
this._updateHeight();
|
||||
}
|
||||
public onLinesDeleted(fromLineNumber: number, toLineNumber: number): void {
|
||||
this._linesLayout.onLinesDeleted(fromLineNumber, toLineNumber);
|
||||
this._updateHeight();
|
||||
}
|
||||
public onLinesInserted(fromLineNumber: number, toLineNumber: number): void {
|
||||
this._linesLayout.onLinesInserted(fromLineNumber, toLineNumber);
|
||||
this._updateHeight();
|
||||
}
|
||||
|
||||
// ---- end view event handlers
|
||||
|
||||
@@ -231,6 +231,7 @@ export class ViewModel extends viewEvents.ViewEventEmitter implements IViewModel
|
||||
}
|
||||
}
|
||||
this.lines.acceptVersionId(versionId);
|
||||
this.viewLayout.onHeightMaybeChanged();
|
||||
|
||||
if (!hadOtherModelChange && hadModelLineChangeThatChangedLineMapping) {
|
||||
eventsCollector.emit(new viewEvents.ViewLineMappingChangedEvent());
|
||||
|
||||
Reference in New Issue
Block a user