mirror of
https://github.com/Microsoft/vscode
synced 2024-10-06 03:17:00 +00:00
Uses Array.map.
This commit is contained in:
parent
b2b3437743
commit
d7ed0e3740
|
@ -185,14 +185,14 @@ export class ViewModelLinesFromProjectedModel implements IViewModelLines {
|
|||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
let newDecorations: IModelDeltaDecoration[] = [];
|
||||
for (const newRange of newRanges) {
|
||||
newDecorations.push({
|
||||
range: newRange,
|
||||
options: ModelDecorationOptions.EMPTY
|
||||
});
|
||||
}
|
||||
|
||||
const newDecorations = newRanges.map<IModelDeltaDecoration>(
|
||||
(r) =>
|
||||
({
|
||||
range: r,
|
||||
options: ModelDecorationOptions.EMPTY,
|
||||
})
|
||||
);
|
||||
|
||||
this.hiddenAreasDecorationIds = this.model.deltaDecorations(this.hiddenAreasDecorationIds, newDecorations);
|
||||
|
||||
|
|
Loading…
Reference in a new issue