is it possible to add the line index of the sfaClose-node to TSynFoldNodeInfo of the sfaOpen-nodes?
This would make invalidation much easier.
In the meantime I see why that question.
I though TLazSynEditNestedFoldsList had a function to get the endline.
But it is on TSynCustomFoldHighlighter: FoldLineLength on FoldEndLine
They can find the line much faster.
TLazSynEditNestedFoldsList should probably get a method to get the end-line, based on the index of he node:
TLazSynEditNestedFoldsList.NodeEndLine[Index: integer]