Add emergency view model reconstruction (hopefuly fixes #56639)

This commit is contained in:
Alex Dima 2018-08-27 15:29:28 +02:00
parent 52a5a3fd16
commit da40432b85

View file

@ -192,6 +192,10 @@ export class SplitLinesCollection implements IViewModelLinesCollection {
// This is pretty bad, it means we lost track of the model...
throw new Error(`ViewModel is out of sync with Model!`);
}
if (this.lines.length !== this.model.getLineCount()) {
// This is pretty bad, it means we lost track of the model...
this._constructLines(false);
}
}
private _constructLines(resetHiddenAreas: boolean): void {