diff --git a/ChangeLog b/ChangeLog
index 25a3637072974caf97ea6dbd9fdad986921bf83d..8e4b32830287a13d0ee951efbbd049def49802ec 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,10 @@ CVS code -
 - nano.c:
   usage()
   	- Remove extra \n in --keypad description (Jordi).
+- winio.c:
+  edit_refresh()
+	- Rename lines to nlines to fix AIX breakage (reported by
+	  Dennis Cranston, re-reported by arh14@cornell.edu).
 - po/ca.po, po/es.po:
 	- Catalan and Spanish translation updates.
 
diff --git a/winio.c b/winio.c
index 6ac8799d0ad5a78a599e8d11bf5704b0e75bb1f7..d1a41cb2b0f3cb3b967c176e480b96e9762fe542 100644
--- a/winio.c
+++ b/winio.c
@@ -1076,7 +1076,7 @@ void center_cursor(void)
 void edit_refresh(void)
 {
     static int noloop = 0;
-    int lines = 0, i = 0, currentcheck = 0;
+    int nlines = 0, i = 0, currentcheck = 0;
     filestruct *temp, *hold = current;
 
     if (current == NULL)
@@ -1084,14 +1084,14 @@ void edit_refresh(void)
 
     temp = edittop;
 
-    while (lines <= editwinrows - 1 && lines <= totlines && temp != NULL) {
+    while (nlines <= editwinrows - 1 && nlines <= totlines && temp != NULL) {
 	hold = temp;
 	update_line(temp, current_x);
 	if (temp == current)
 	    currentcheck = 1;
 
 	temp = temp->next;
-	lines++;
+	nlines++;
     }
     /* If noloop == 1, then we already did an edit_update without finishing
        this function.  So we don't run edit_update again */
@@ -1101,10 +1101,10 @@ void edit_refresh(void)
     } else if (noloop)
 	noloop = 0;
 
-    if (lines <= editwinrows - 1)
-	while (lines <= editwinrows - 1) {
-	    mvwaddstr(edit, lines, i, hblank);
-	    lines++;
+    if (nlines <= editwinrows - 1)
+	while (nlines <= editwinrows - 1) {
+	    mvwaddstr(edit, nlines, i, hblank);
+	    nlines++;
 	}
     if (temp == NULL)
 	editbot = hold;