Skip to content

Commit

Permalink
[fix] Preserve cursor position (#123)
Browse files Browse the repository at this point in the history
  • Loading branch information
mahdi-shojaee committed Jun 10, 2020
1 parent fe01ec7 commit 938ee60
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bin/wscat
Expand Up @@ -61,7 +61,7 @@ class Console extends EventEmitter {
}

prompt() {
this.readlineInterface.prompt();
this.readlineInterface.prompt(true);
}

print(type, msg, color) {
Expand All @@ -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');
}
}

Expand Down

0 comments on commit 938ee60

Please sign in to comment.