mmanela / diffplex

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

GetLinesInViewport should consider ignore unchanged. #123

Open kbeatty-ascensionas opened 2 months ago

kbeatty-ascensionas commented 2 months ago

Closes https://github.com/mmanela/diffplex/issues/122

mmanela commented 2 months ago

@kingcean Could you review?

mmanela commented 1 month ago

@kbeatty-ascensionas Can you share an example text to test with to see the behavior so I can validate?

kbeatty-ascensionas commented 1 month ago

diffplexGetLinesInViewportBugExample.zip

image

kbeatty-ascensionas commented 1 month ago

What I was seeing is the early breakout in the loop would happen as soon as the first not in the viewport line was encountered. This was exposed by my previous fix that marked zero height lines as NOT being in the view.

Ignore the image, it illustrates my previous fix. Not this one.

kbeatty-ascensionas commented 1 month ago

image This image illustrates the new problem that I see.