softwrap: scroll 'enough' whenever it surpasses 'amount'
This fixes https://savannah.gnu.org/bugs/?49086.master
parent
fc9c7b4917
commit
97f6ae5267
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue