Commit dbfe83bb67b1ed2f76a16654e4eaf0ae0f426a97

antirez 2023-03-26T16:44:29

Multiplexing: fix refreshMultiLine().

1
2
3
4
5
6
7
8
9
10
11
12
13
14
diff --git a/linenoise.c b/linenoise.c
index fa998a0..ea792d1 100644
--- a/linenoise.c
+++ b/linenoise.c
@@ -590,7 +590,9 @@ static void refreshMultiLine(struct linenoiseState *l, int flags) {
             snprintf(seq,64,"\r\x1b[0K\x1b[1A");
             abAppend(&ab,seq,strlen(seq));
         }
+    }
 
+    if (flags & REFRESH_ALL) {
         /* Clean the top line. */
         lndebug("clear");
         snprintf(seq,64,"\r\x1b[0K");