From 938ee60fca3191d7d4697a22a915963fb1df01cf Mon Sep 17 00:00:00 2001 From: Mahdi Shojaei Date: Wed, 10 Jun 2020 22:22:02 +0430 Subject: [PATCH] [fix] Preserve cursor position (#123) --- bin/wscat | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/wscat b/bin/wscat index 59a9d88..4f1e09c 100755 --- a/bin/wscat +++ b/bin/wscat @@ -61,7 +61,7 @@ class Console extends EventEmitter { } prompt() { - this.readlineInterface.prompt(); + this.readlineInterface.prompt(true); } print(type, msg, color) { @@ -82,7 +82,7 @@ class Console extends EventEmitter { clear() { if (tty.isatty(1)) { - this.stdout.write('\u001b[2K\u001b[3D'); + this.stdout.write('\r\u001b[2K\u001b[3D'); } }