1623
1624
private handleBeforeFireDecorationsChangedEvent(affectedInjectedTextLines: Set<number> | null, affectedLineHeights: Set<LineHeightChangingDecoration> | null, affectedFontLines: Set<LineFontChangingDecoration> | null): void {
1625
>
// This is called before the decoration changed event is fired.
textModel.ts
1626
>
1627
>
if (affectedInjectedTextLines && affectedInjectedTextLines.size > 0) {
1628
const affectedLines = Array.from(affectedInjectedTextLines);
1629
const lineChangeEvents = affectedLines.map(lineNumber => new ModelRawLineChanged(lineNumber, lineNumber));
1630
this._onDidChangeContentOrInjectedText(new ModelInjectedTextChangedEvent(lineChangeEvents));
1631
}
1632
>
this._fireOnDidChangeLineHeight(affectedLineHeights);
textModel.ts
1633
>
this._fireOnDidChangeFont(affectedFontLines);
1634
>
}
1635
1636
private _fireOnDidChangeLineHeight(affectedLineHeights: Set<LineHeightChangingDecoration> | null): void {
1637
>
if (affectedLineHeights && affectedLineHeights.size > 0) {
textModel.ts
1638
const affectedLines = Array.from(affectedLineHeights);
1639
const lineHeightChangeEvent = affectedLines.map(specialLineHeightChange => new ModelLineHeightChanged(specialLineHeightChange.ownerId, specialLineHeightChange.decorationId, specialLineHeightChange.lineNumber, specialLineHeightChange.lineHeight));
1640
this._onDidChangeLineHeight.fire(new ModelLineHeightChangedEvent(lineHeightChangeEvent));
1641
}
1643
1644
private _fireOnDidChangeFont(affectedFontLines: Set<LineFontChangingDecoration> | null): void {
1645
>
if (affectedFontLines && affectedFontLines.size > 0) {
textModel.ts
1646
const affectedLines = Array.from(affectedFontLines);
1647
const fontChangeEvent = affectedLines.map(fontChange => new ModelFontChanged(fontChange.ownerId, fontChange.lineNumber));
1648
this._onDidChangeFont.fire(new ModelFontChangedEvent(fontChangeEvent));
1649
}
1651
1652
private _onDidChangeContentOrInjectedText(e: InternalModelContentChangeEvent | ModelInjectedTextChangedEvent): void {