[PATCH] input: Fix history line reading regression

Herbert Xu <[email protected]>
Newsgroups org.kernel.vger.dash
Message-ID <ZizBJhvmuy/[email protected]>
When a newline is encountered with history support, terminate
the loop immediately.

Fixes: 44ae22beedf8 ("input: Disable lleft in SMALL mode")
Signed-off-by: Herbert Xu <[email protected]>
---
 src/input.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/input.c b/src/input.c
index 38969a7..fb9858f 100644
--- a/src/input.c
+++ b/src/input.c
@@ -301,7 +301,7 @@ again:
 		switch (c) {
 		case '\n':
 			parsefile->nleft = q - parsefile->nextc - 1;
-			goto check;
+			goto done;
 
 		default:
 			something = 1;
@@ -320,6 +320,7 @@ check:
 			break;
 		}
 	}
+done:
 	input_set_lleft(parsefile, more);
 
 	if (!IS_DEFINED_SMALL)
-- 
2.39.2

-- 
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.