From 7dfec43f421cab35ed61f730ef29ec858d05c06e Mon Sep 17 00:00:00 2001
From: David Lawrence Ramsey <pooka109@gmail.com>
Date: Thu, 12 Aug 2004 15:20:14 +0000
Subject: [PATCH] per DB's patch, show the "Press Return To Continue" prompt if
 we can't read the .nano_history file while starting nano

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1896 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
---
 ChangeLog   | 5 +++--
 src/files.c | 3 +++
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 6e95a051..333caa4d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -68,8 +68,9 @@ CVS code -
 	- Readded the errors flag and moved the ending prompt from
 	  rcfile_error() to parse_rcfile() so that we only get prompted
 	  once for all errors instead of separately for each error.
-	  (DLR)  David Benbennick: Make sure that no rcfile error 
-	  messages end in newlines.
+	  (DLR)  David Benbennick: Make sure that no rcfile error
+	  messages end in newlines, and show the ending prompt if we
+	  can't read the .nano_history file while starting nano.
 	- Don't treat the return value of strn?(case)?cmp() as boolean.
 	  (DLR and David Benbennick)
 	- Automatically install a symlink "rnano" pointing to nano.
diff --git a/src/files.c b/src/files.c
index 573578fd..bddfba91 100644
--- a/src/files.c
+++ b/src/files.c
@@ -2943,6 +2943,9 @@ void load_history(void)
 		/* Don't save history when we quit. */
 		UNSET(HISTORYLOG);
 		rcfile_error(N_("Error reading %s: %s"), nanohist, strerror(errno));
+		fprintf(stderr, _("\nPress Return to continue starting nano\n"));
+		while (getchar() != '\n')
+		    ;
 	    }
 	    free(nanohist);
 	} else {
-- 
GitLab