Commit 2fa93ae9 authored by Benno Schulenberg's avatar Benno Schulenberg
Browse files

tweaks: rename two variables to make more sense

parent c8c6340c
Showing with 9 additions and 8 deletions
+9 -8
...@@ -2810,21 +2810,22 @@ void compute_maxrows(void) ...@@ -2810,21 +2810,22 @@ void compute_maxrows(void)
{ {
#ifndef NANO_TINY #ifndef NANO_TINY
if (ISSET(SOFTWRAP)) { if (ISSET(SOFTWRAP)) {
int n; int screenrow;
filestruct *foo = openfile->edittop; filestruct *line = openfile->edittop;
maxrows = 0; 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++; maxrows++;
n += strlenpt(foo->data) / editwincols;
foo = foo->next;
} }
if (n < editwinrows) if (screenrow < editwinrows)
maxrows += editwinrows - n; maxrows += editwinrows - screenrow;
#ifdef DEBUG #ifdef DEBUG
fprintf(stderr, "compute_maxrows(): maxrows = %d\n", maxrows); fprintf(stderr, "recomputed: maxrows = %d\n", maxrows);
#endif #endif
} else } else
#endif /* !NANO_TINY */ #endif /* !NANO_TINY */
......
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