diff --git a/src/files.c b/src/files.c
index bf8d8f0510858c05bc3ee9515257fc51f9deb706..df3bb3e36c823c6e69570b02ca2460cea1460acb 100644
--- a/src/files.c
+++ b/src/files.c
@@ -78,6 +78,7 @@ void make_new_buffer(void)
 
 	/* There is more than one file open: show "Close" in help lines. */
 	exitfunc->desc = close_tag;
+	more_than_one = TRUE;
     }
 
     /* Make the new buffer the current one, and start initializing it. */
diff --git a/src/global.c b/src/global.c
index 328d20f2f214293ae8ebc12482c307f342bbdbb2..7a56664b11e393f1d54ce202f2251908904c5291 100644
--- a/src/global.c
+++ b/src/global.c
@@ -70,6 +70,9 @@ bool inhelp = FALSE;
 char *title = NULL;
 	/* When not NULL: the title of the current help text. */
 
+bool more_than_one = FALSE;
+	/* Whether more than one buffer is or has been open. */
+
 int didfind = 0;
 	/* Whether the last search found something. */
 
diff --git a/src/proto.h b/src/proto.h
index 13cc53690ed51bd825c604ceab9f6a63a0d081cc..a9f826b3dddd395592c8e0efb7dd42e76c7bb8ce 100644
--- a/src/proto.h
+++ b/src/proto.h
@@ -56,6 +56,8 @@ extern filestruct *pletion_line;
 extern bool inhelp;
 extern char *title;
 
+extern bool more_than_one;
+
 extern int didfind;
 
 extern int controlleft;
diff --git a/src/winio.c b/src/winio.c
index ebc37008b2c47e473a1082057b86053c70564a53..86f67b3685a664fe7653d3e7333b93099290394b 100644
--- a/src/winio.c
+++ b/src/winio.c
@@ -2030,7 +2030,7 @@ void titlebar(const char *path)
      * then sacrifice the prefix, and only then start dottifying. */
 
     /* When multiple buffers are open, show which one out of how many. */
-    if (path == NULL && firstfile != firstfile->next) {
+    if (path == NULL && more_than_one) {
 	indicator = charalloc(24);
 	sprintf(indicator, "[%i/%i]", buffer_number(openfile),
 					buffer_number(firstfile->prev));