Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Do not clear current line on forward bol

  • Loading branch information...
commit a9e4f0ca22eacc1dbfed1ebdc9d343791113d1b3 1 parent b1611b5
Mariusz Nowak authored
Showing with 3 additions and 3 deletions.
  1. +2 −2 lib/index.js
  2. +1 −1  test/index.js
4 lib/index.js
View
@@ -120,8 +120,8 @@ module.exports = defineProperties(getFn(), {
dir = (n >= 0) ? 'E' : 'F';
n = floor(abs(n));
return arguments[1] ?
- ('\x1b[0E\x1bK' + repeat.call('\x1b[1' + dir + '\x1b[K', n)) :
- '\x1b[' + n + dir;
+ (((!n || (dir === 'F')) ? '\x1b[0E\x1bK' : '') +
+ repeat.call('\x1b[1' + dir + '\x1b[K', n)) : '\x1b[' + n + dir;
}),
beep: d('\x07'),
xtermSupported: d(Boolean(!xtermMatch)),
2  test/index.js
View
@@ -102,7 +102,7 @@ module.exports = function (t, a) {
a(t.bol({}, true), '\x1b[0E\x1bK', "Bol: Erase: Not a number");
a(t.bol(-2, true), '\x1b[0E\x1bK\x1b[1F\x1b[K\x1b[1F\x1b[K',
"Bol: Erase: Negative");
- a(t.bol(2, true), '\x1b[0E\x1bK\x1b[1E\x1b[K\x1b[1E\x1b[K',
+ a(t.bol(2, true), '\x1b[1E\x1b[K\x1b[1E\x1b[K',
"Bol: Erase: Positive");
a(t.beep, '\x07', "Beep");
Please sign in to comment.
Something went wrong with that request. Please try again.