indicator: do not oversize the scroller when softwrapping

This fixes https://savannah.gnu.org/bugs/?65445.

Bug existed since version 5.7, commit 49d8b99e.
This commit is contained in:
Benno Schulenberg 2024-03-11 10:55:07 +01:00
parent 778f000a3b
commit 8cf61af551
1 changed files with 1 additions and 1 deletions

View File

@ -3066,7 +3066,7 @@ void draw_scrollbar(void)
int lowest = (fromline * editwinrows) / totallines;
int highest = lowest + (editwinrows * coveredlines) / totallines;
if (editwinrows > totallines)
if (editwinrows > totallines && !ISSET(SOFTWRAP))
highest = editwinrows;
for (int row = 0; row < editwinrows; row++) {