mmanela / diffplex

DiffPlex is Netstandard 1.0+ C# library to generate textual diffs.
Apache License 2.0
990 stars 183 forks source link

GetLinesInViewport has issues with collapse unchanged sections #120

Closed kbeatty-ascensionas closed 3 months ago

kbeatty-ascensionas commented 3 months ago

The VisibilityLevels.Half and VisibilityLevels.All options always start with line 1 and the VisibilityLevels.Any option returns strange values when dynamically changing the lines of context.

I believe the issue in both cases is in Helper.GetLineViewportStates(). If the framework element has height 0 it can be considered in the view in many cases (especially for the Half and All options). Adding "ele.ActualHeight > 0" to the list of conditions for isIn should fix this.

kbeatty-ascensionas commented 2 months ago

What are the plans for the next build?