substack/node-charm — Issue #5: Position does not work on node 0.6.3 (and higher)
Author: afriggeri
Created: 2011-12-08 12:17:46+00:00
State: open

Using the following script:

// test.js
var charm = require('charm')(process.stdin, process.stdout);

charm.position(function(x,y){
console.log(x,y);
process.exit();
});

$ n 0.4.7
$ node test.js
1 2
$ n 0.6.3
$ node test.js
^[[7;1R

I guess this has something to do with the fact that `process.stdin` and `process.stdout` became blocking on 0.6.3 when using a tty