:: commit 104e0c5ef16b4e1348a31d873204a84031ca5a13

mintsuki <mintsuki@protonmail.com> — 2022-11-19 07:04

parents: 1c0db86965

readline: Fix issue arising from terminal's wraparound handling fix

diff --git a/common/lib/readline.c b/common/lib/readline.c
index 5d36a192..e1403ed2 100644
--- a/common/lib/readline.c
+++ b/common/lib/readline.c
@@ -466,7 +466,7 @@ void readline(const char *orig_str, char *buf, size_t limit) {
                     // If cursor has wrapped around, move the line start position up one row
                     if (prev_x == term->cols - 1 && prev_y == term->rows - 1) {
                         orig_y--;
-                        print("\e[J");  // Clear the bottom line
+                        print("\n\e[J");  // Clear the bottom line
                     }
                 }
             }
tab: 248 wrap: offon