From 690864e970229bf73487821ea879d7028609bb24 Mon Sep 17 00:00:00 2001 From: nvx Date: Sun, 3 Nov 2024 10:57:11 +1000 Subject: [PATCH] clear the prompt using ANSI "clear entire line" escape this replaces the old behaviour of using a fixed length of spaces which can sometimes fail to clear the entire line if it's too long --- client/src/proxmark3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/proxmark3.c b/client/src/proxmark3.c index f098eaf6c..1beb93c2a 100644 --- a/client/src/proxmark3.c +++ b/client/src/proxmark3.c @@ -278,7 +278,7 @@ static void prompt_compose(char *buf, size_t buflen, const char *promptctx, cons if (no_newline) { snprintf(buf, buflen - 1, PROXPROMPT_COMPOSE, promptdev, promptnet, promptctx); } else { - snprintf(buf, buflen - 1, "\r \r" PROXPROMPT_COMPOSE, promptdev, promptnet, promptctx); + snprintf(buf, buflen - 1, "\33[2K\r" PROXPROMPT_COMPOSE, promptdev, promptnet, promptctx); } }