From 6e1cd06b96133bdd0b7c110d3976638c4c508797 Mon Sep 17 00:00:00 2001
From: David Lawrence Ramsey <pooka109@gmail.com>
Date: Sun, 2 Jan 2005 23:50:29 +0000
Subject: [PATCH] when we get a newline via verbatim input at the statusbar
 prompt, set input to NANO_ENTER_KEY so that the cursor position is reset
 properly

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2218 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
---
 src/winio.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/winio.c b/src/winio.c
index 05e07b06..0c5cf624 100644
--- a/src/winio.c
+++ b/src/winio.c
@@ -1776,10 +1776,13 @@ int do_statusbar_input(bool *meta_key, bool *func_key, bool *s_or_t,
 
 			    do_statusbar_verbatim_input(&got_enter);
 
-			    /* If we got the Enter key, set finished to
+			    /* If we got the Enter key, set input to the
+			     * key value for Enter, and set finished to
 			     * TRUE to indicate that we're done. */
-			    if (got_enter)
+			    if (got_enter) {
+				input = NANO_ENTER_KEY;
 				*finished = TRUE;
+			    }
 			}
 			break;
 		    }
-- 
GitLab