Skip to content

Commit

Permalink
fix: Ensure to use widely supported ANSI codes for line move
Browse files Browse the repository at this point in the history
  • Loading branch information
medikoo committed Mar 31, 2022
1 parent 39eedbd commit 6838339
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions move.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ module.exports = Object.defineProperties(
lines: d(function (n) {
var dir;
n = trunc(n) || 0;
dir = n >= 0 ? "E" : "F";
dir = n >= 0 ? "B" : "A";
n = floor(abs(n));
return "\x1b[" + n + dir;
return "\x1b[" + n + dir + "\x1b[1G";
}),
top: d("\x1b[5000F"),
bottom: d("\x1b[5000B"),
Expand Down

0 comments on commit 6838339

Please sign in to comment.