Skip to content

Commit b94c047

Browse files
author
cloudhead
committed
fixed watch mode in OS X Terminal
1 parent a532f17 commit b94c047

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

bin/vows

+3-5
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,6 @@ if (! options.watch) {
208208
cue = pendulum, current = 0;
209209
}
210210

211-
cursorSave();
212211
eraseLine();
213212
lastRun && !running && esc(colors[status.errored ? 2 : (status.broken ? 1 : 0)]);
214213
print(cue[current]);
@@ -224,10 +223,9 @@ if (! options.watch) {
224223
// Utility functions
225224
//
226225
function print(str) { sys.print(str) }
227-
function esc(str) { print("\033[" + str) }
228-
function eraseLine() { esc("2K") }
229-
function cursorSave() { esc("s") }
230-
function cursorRestore() { esc("u") }
226+
function esc(str) { print("\x1b[" + str) }
227+
function eraseLine() { esc("0K") }
228+
function cursorRestore() { esc("0G") }
231229
function cursorHide() { esc("?25l") }
232230
function cursorShow() { esc("?25h") }
233231
function cleanup() { eraseLine(), cursorShow(), print('\n') }

0 commit comments

Comments
 (0)