Module: core/updateSelections/updateRangeInfos
Functions
updateRangeInfos
▸ updateRangeInfos(changeEvent
, rangeInfoGenerator
): void
Iterates through the given range infos and updates them to take into account the given changes.
For a given range / change pair, if the given change original range doesn't overlap with and is not adjacent to the range to update, the range will just be shifted as necessary if it is after the change range.
For a range / change pair that are adjacent or have some overlap, delegate
to the functions getOffsetsForDeleteOrReplace
,
getOffsetsForEmptyRangeInsert
, and getOffsetsForNonEmptyRangeInsert
.
See their documentation for information about how these cases are handled.
Parameters
Name | Type | Description |
---|---|---|
changeEvent | ExtendedTextDocumentChangeEvent | Information about the change that occurred |
rangeInfoGenerator | Generator <FullRangeInfo , void , unknown > | A generator yielding FullRangeInfo s to update |
Returns
void
Defined in
core/updateSelections/updateRangeInfos.ts:29