From c11b6f4885e879661e2cc39c90593cd2de6db3d1 Mon Sep 17 00:00:00 2001 From: wuzhenghui Date: Tue, 25 Jan 2022 14:40:17 +0800 Subject: [PATCH] fix console stuck in auto test --- components/console/linenoise/linenoise.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/console/linenoise/linenoise.c b/components/console/linenoise/linenoise.c index 6962188d43..ecdbf3a366 100644 --- a/components/console/linenoise/linenoise.c +++ b/components/console/linenoise/linenoise.c @@ -865,7 +865,7 @@ static int linenoiseEdit(char *buf, size_t buflen, const char *prompt) nread = read(in_fd, &c, 1); if (nread <= 0) return l.len; - if ( (getMillis() - t1) < LINENOISE_PASTE_KEY_DELAY ) { + if ( (getMillis() - t1) < LINENOISE_PASTE_KEY_DELAY && c != ENTER) { /* Pasting data, insert characters without formatting. * This can only be performed when the cursor is at the end of the * line. */