diff --git a/src/files.c b/src/files.c
index 26b1746d12ac55b37f210b69270dd401f965d619..848d2c8d430555e39332b5dde2ad7efb8ba7753c 100644
--- a/src/files.c
+++ b/src/files.c
@@ -230,7 +230,15 @@ void open_buffer(const char *filename)
 /* Update the screen to account for the current buffer. */
 void display_buffer(void)
 {
+    /* Update the titlebar, since the filename may have changed. */
     titlebar(NULL);
+
+#ifdef ENABLE_COLOR
+    /* Update the buffer's associated colors, if applicable. */
+    color_update();
+#endif
+
+    /* Update the edit window. */
     edit_refresh();
 }
 
diff --git a/src/nano.c b/src/nano.c
index 2d7338e815f4f8586af630673256af65fc48f500..770afe37764d498b9b2f41d2c8cf204f07b4e24c 100644
--- a/src/nano.c
+++ b/src/nano.c
@@ -191,7 +191,7 @@ void renumber(filestruct *fileptr)
     assert(fileptr != fileptr->next);
 
     for (; fileptr != NULL; fileptr = fileptr->next)
-	fileptr->lineno = ++line;
+	fileptr->lineno = line++;
 }
 
 /* Partition a filestruct so it begins at (top, top_x) and ends at (bot,
diff --git a/src/winio.c b/src/winio.c
index 3f0481b17da68e8e8548a0a8a329f791c58ddeda..1d7a0b00c3cba9039886b77e035f3cbdb53ea916 100644
--- a/src/winio.c
+++ b/src/winio.c
@@ -3510,7 +3510,7 @@ int need_vertical_update(size_t old_pww)
  * two is the current line at either time. */
 void edit_scroll(updown direction, int nlines)
 {
-    filestruct *foo;
+    const filestruct *foo;
     int i, scroll_rows = 0;
 
     /* Scrolling less than one line or more than editwinrows lines is