You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(PowerShellGH-813) Refactor the FoldingReference arrays and lists into it's own class
Previously the folding provider created many intermediate arrays and lists and
required post-processing. This commit changes the behaviour to use an
accumlator patter with an extended Dictionary class. This new class adds a
`SafeAdd` method to add FoldingRanges, which then has the logic to determine if
the range should indeed be added, for example, passing nulls or pre-existing
larger ranges.
By passing around this list using ByReference we can avoid creating many objects
which are just then thrown away.
This commit also moves the ShowLastLine code from the FoldingProvider into the
Language Server. This reduces the number of array enumerations to one.
0 commit comments