Skip to content

Commit

Permalink
fixed watch mode in OS X Terminal
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudhead committed Jun 23, 2010
1 parent a532f17 commit b94c047
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions bin/vows
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,6 @@ if (! options.watch) {
cue = pendulum, current = 0;
}

cursorSave();
eraseLine();
lastRun && !running && esc(colors[status.errored ? 2 : (status.broken ? 1 : 0)]);
print(cue[current]);
Expand All @@ -224,10 +223,9 @@ if (! options.watch) {
// Utility functions
//
function print(str) { sys.print(str) }
function esc(str) { print("\033[" + str) }
function eraseLine() { esc("2K") }
function cursorSave() { esc("s") }
function cursorRestore() { esc("u") }
function esc(str) { print("\x1b[" + str) }
function eraseLine() { esc("0K") }
function cursorRestore() { esc("0G") }
function cursorHide() { esc("?25l") }
function cursorShow() { esc("?25h") }
function cleanup() { eraseLine(), cursorShow(), print('\n') }
Expand Down

0 comments on commit b94c047

Please sign in to comment.