ScintillaNET
ScintillaNET copied to clipboard
Use the correct upper bound when clamping the display line
Currently, Lines.Count is used for the upper bound when clamping the displayLine in DocLineFromVisible().
That can be incorrect in the following:
- It can be too low if Word Wrap is enabled.
- It can be too high if lines are collapsed with Code Folding.
Instead, the actual visible line count should be calculated.