Commit 97f6ae52 authored by Benno Schulenberg's avatar Benno Schulenberg
Browse files

softwrap: scroll 'enough' whenever it surpasses 'amount'

This fixes https://savannah.gnu.org/bugs/?49086.
No related merge requests found
Showing with 3 additions and 2 deletions
+3 -2
......@@ -482,11 +482,12 @@ void do_down(bool scroll_only)
/* Reduce the amount when there are overlong lines at the top. */
for (enough = 1; enough < amount; enough++) {
amount -= strlenpt(topline->data) / COLS;
if (amount <= 0) {
if (amount > 0)
topline = topline->next;
if (amount < enough) {
amount = enough;
break;
}
topline = topline->next;
}
}
#endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment