tweaks: rename two variables to make more sense

master
Benno Schulenberg 2016-12-09 12:47:00 +01:00
parent c8c6340ce8
commit 2fa93ae999
1 changed files with 9 additions and 8 deletions

View File

@ -2810,21 +2810,22 @@ void compute_maxrows(void)
{
#ifndef NANO_TINY
if (ISSET(SOFTWRAP)) {
int n;
filestruct *foo = openfile->edittop;
int screenrow;
filestruct *line = openfile->edittop;
maxrows = 0;
for (n = 0; n < editwinrows && foo; n++) {
for (screenrow = 0; screenrow < editwinrows && line != NULL; screenrow++) {
screenrow += strlenpt(line->data) / editwincols;
line = line->next;
maxrows++;
n += strlenpt(foo->data) / editwincols;
foo = foo->next;
}
if (n < editwinrows)
maxrows += editwinrows - n;
if (screenrow < editwinrows)
maxrows += editwinrows - screenrow;
#ifdef DEBUG
fprintf(stderr, "compute_maxrows(): maxrows = %d\n", maxrows);
fprintf(stderr, "recomputed: maxrows = %d\n", maxrows);
#endif
} else
#endif /* !NANO_TINY */