From bd68a7d4531e72f5c332c2c3176b97b77bffc57e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=B0=D0=BD=D0=B8=D0=BB=D0=B0=20=D0=93=D0=BE=D1=80?= =?UTF-8?q?=D0=BD=D1=83=D1=88=D0=BA=D0=BE?= Date: Fri, 24 Nov 2023 00:42:17 +0300 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 2e1b196..7674cbf 100644 --- a/components/console/linenoise/linenoise.c +++ b/components/console/linenoise/linenoise.c @@ -991,7 +991,7 @@ char *linenoiseEditFeed(struct linenoiseState *l) { nread = fread(&c, 1, 1, stdin); if (nread <= 0) return NULL; // FIXME: line printed twice after pasting something - 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. */