From a2038a9b2ba0ae21504442c6f4fbdaeff765781e Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <bensberg@justemail.net>
Date: Wed, 31 May 2017 15:11:11 +0200
Subject: [PATCH] input: give an appropriate message when there are too many
 errors

This fixes a secondary part of https://savannah.gnu.org/bugs/?51124.
---
 src/winio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/winio.c b/src/winio.c
index b27af3e3..1c4aa2bc 100644
--- a/src/winio.c
+++ b/src/winio.c
@@ -142,7 +142,7 @@ void get_key_buffer(WINDOW *win)
 	 * check if errno is set to EIO ("Input/output error") and die in
 	 * that case, but it's not always set properly.  Argh. */
 	if (++errcount == MAX_BUF_SIZE)
-	    handle_hupterm(0);
+	    die(_("Too many errors from stdin"));
 
 #ifndef NANO_TINY
 	if (the_window_resized) {
-- 
GitLab