diff --git a/src/global.c b/src/global.c
index 3eb2c5c06e268510a69377f6a2a97027384ec8ee..690dfc6bc892f3426d0de2557be429cb628aa574 100644
--- a/src/global.c
+++ b/src/global.c
@@ -94,8 +94,8 @@ WINDOW *bottomwin;
 	 * messages, the statusbar prompt, and a list of shortcuts. */
 int editwinrows = 0;
 	/* How many rows does the edit window take up? */
-int maxrows = 0;
-	/* How many usable lines there are (due to soft wrapping). */
+int maxlines = 0;
+	/* How many file lines can be shown (due to soft wrapping). */
 
 filestruct *cutbuffer = NULL;
 	/* The buffer where we store cut text. */
diff --git a/src/move.c b/src/move.c
index d6b0dc22efa7f351e5c3203250218ca8fcafc294..3eac79cc7812f33a47ddc199ec287667c6659da8 100644
--- a/src/move.c
+++ b/src/move.c
@@ -100,7 +100,7 @@ void do_page_down(void)
 
     /* If the cursor is less than a page away from the bottom of the file,
      * put it at the end of the last line. */
-    if (openfile->current->lineno + maxrows - 2 >= openfile->filebot->lineno) {
+    if (openfile->current->lineno + maxlines - 2 >= openfile->filebot->lineno) {
 	do_last_line();
 	return;
     }
@@ -112,7 +112,7 @@ void do_page_down(void)
 	openfile->placewewant = openfile->current_y = 0;
     }
 
-    mustmove = (maxrows < 3) ? 1 : maxrows - 2;
+    mustmove = (maxlines < 3) ? 1 : maxlines - 2;
 
     for (i = mustmove; i > 0 && openfile->current != openfile->filebot; i--) {
 	openfile->current = openfile->current->next;
diff --git a/src/proto.h b/src/proto.h
index b34db490385dd52e639bed99c283f99126fcab3d..924e7961566496f9b93f87b8018d1c2404be071c 100644
--- a/src/proto.h
+++ b/src/proto.h
@@ -76,7 +76,7 @@ extern WINDOW *topwin;
 extern WINDOW *edit;
 extern WINDOW *bottomwin;
 extern int editwinrows;
-extern int maxrows;
+extern int maxlines;
 
 extern filestruct *cutbuffer;
 extern filestruct *cutbottom;
diff --git a/src/winio.c b/src/winio.c
index 7509a2cc5773eb204599c47c45c4c62108fb72e0..f15b6bf3be1ae9822d33f963a1c61fff213946d1 100644
--- a/src/winio.c
+++ b/src/winio.c
@@ -2755,30 +2755,30 @@ bool need_horizontal_scroll(const size_t old_column, const size_t new_column)
 
 /* When edittop changes, try and figure out how many lines we really
  * have to work with, accounting for softwrap mode. */
-void compute_maxrows(void)
+void compute_maxlines(void)
 {
 #ifndef NANO_TINY
     if (ISSET(SOFTWRAP)) {
 	int screenrow;
 	filestruct *line = openfile->edittop;
 
-	maxrows = 0;
+	maxlines = 0;
 
 	for (screenrow = 0; screenrow < editwinrows && line != NULL; screenrow++) {
 	    screenrow += strlenpt(line->data) / editwincols;
 	    line = line->next;
-	    maxrows++;
+	    maxlines++;
 	}
 
 	if (screenrow < editwinrows)
-	    maxrows += editwinrows - screenrow;
+	    maxlines += editwinrows - screenrow;
 
 #ifdef DEBUG
-	fprintf(stderr, "recomputed: maxrows = %d\n", maxrows);
+	fprintf(stderr, "recomputed: maxlines = %d\n", maxlines);
 #endif
     } else
 #endif /* !NANO_TINY */
-	maxrows = editwinrows;
+	maxlines = editwinrows;
 }
 
 /* Scroll the edit window in the given direction and the given number
@@ -2877,7 +2877,7 @@ void edit_scroll(scroll_dir direction, ssize_t nlines)
 	foo = foo->next;
     }
 
-    compute_maxrows();
+    compute_maxlines();
 }
 
 /* Update any lines between old_current and current that need to be
@@ -2889,9 +2889,9 @@ void edit_redraw(filestruct *old_current)
     openfile->placewewant = xplustabs();
 
     /* If the current line is offscreen, scroll until it's onscreen. */
-    if (openfile->current->lineno >= openfile->edittop->lineno + maxrows ||
+    if (openfile->current->lineno >= openfile->edittop->lineno + maxlines ||
 #ifndef NANO_TINY
-		(openfile->current->lineno == openfile->edittop->lineno + maxrows - 1 &&
+		(openfile->current->lineno == openfile->edittop->lineno + maxlines - 1 &&
 		ISSET(SOFTWRAP) && strlenpt(openfile->current->data) >= editwincols) ||
 #endif
 		openfile->current->lineno < openfile->edittop->lineno) {
@@ -2933,15 +2933,15 @@ void edit_refresh(void)
     filestruct *line;
     int row = 0;
 
-    /* Figure out what maxrows should really be. */
-    compute_maxrows();
+    /* Figure out what maxlines should really be. */
+    compute_maxlines();
 
     /* If the current line is out of view, get it back on screen. */
     if (openfile->current->lineno < openfile->edittop->lineno ||
-		openfile->current->lineno >= openfile->edittop->lineno + maxrows) {
+		openfile->current->lineno >= openfile->edittop->lineno + maxlines) {
 #ifdef DEBUG
-	fprintf(stderr, "edit-refresh: line = %ld, edittop = %ld and maxrows = %d\n",
-		(long)openfile->current->lineno, (long)openfile->edittop->lineno, maxrows);
+	fprintf(stderr, "edit-refresh: line = %ld, edittop = %ld and maxlines = %d\n",
+		(long)openfile->current->lineno, (long)openfile->edittop->lineno, maxlines);
 #endif
 	adjust_viewport((focusing || !ISSET(SMOOTH_SCROLL)) ? CENTERING : STATIONARY);
     }
@@ -3021,7 +3021,7 @@ void adjust_viewport(update_type manner)
 #ifdef DEBUG
     fprintf(stderr, "adjust_viewport(): setting edittop to lineno %ld\n", (long)openfile->edittop->lineno);
 #endif
-    compute_maxrows();
+    compute_maxlines();
 }
 
 /* Unconditionally redraw the entire screen. */