fix console stuck in auto test

This commit is contained in:
Данила Горнушко 2023-11-24 00:42:17 +03:00
parent 0ca67d25a1
commit bd68a7d453

View file

@ -991,7 +991,7 @@ char *linenoiseEditFeed(struct linenoiseState *l) {
nread = fread(&c, 1, 1, stdin); nread = fread(&c, 1, 1, stdin);
if (nread <= 0) return NULL; if (nread <= 0) return NULL;
// FIXME: line printed twice after pasting something // 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. /* Pasting data, insert characters without formatting.
* This can only be performed when the cursor is at the end of the * This can only be performed when the cursor is at the end of the
* line. */ * line. */