summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorYoshihiro KIKUCHI <yknetg@gmail.com>2011-06-30 22:20:23 +0900
committerisaacs <i@izs.me>2011-07-01 00:33:41 -0700
commit99b210d7eaca6d0bf8731b338ce0a32d9df1e493 (patch)
tree2723862ed2a10788b2b5f09c7336ea71dabf45c9 /lib
parente286480e3495040bfe2d87f6fdf3c56c5f695bb3 (diff)
downloadandroid-node-v8-99b210d7eaca6d0bf8731b338ce0a32d9df1e493.tar.gz
android-node-v8-99b210d7eaca6d0bf8731b338ce0a32d9df1e493.tar.bz2
android-node-v8-99b210d7eaca6d0bf8731b338ce0a32d9df1e493.zip
tiny fixes in tty_posix.js
Close #1158 Close #1160 Close #1252
Diffstat (limited to 'lib')
-rw-r--r--lib/tty_posix.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/tty_posix.js b/lib/tty_posix.js
index a114d7cba2..67d0d91075 100644
--- a/lib/tty_posix.js
+++ b/lib/tty_posix.js
@@ -71,14 +71,14 @@ function ReadStream(fd) {
} else {
// Nobody's watching anyway
self.removeListener('data', onData);
- self.on('newlistener', onNewListener);
+ self.on('newListener', onNewListener);
}
}
function onNewListener(event) {
if (event == 'keypress') {
self.on('data', onData);
- self.removeListener('newlistener', onNewListener);
+ self.removeListener('newListener', onNewListener);
}
}
@@ -331,7 +331,7 @@ WriteStream.prototype.cursorTo = function(x, y) {
if (typeof x !== 'number')
throw new Error("Can't set cursor row without also setting it's column");
- if (typeof x === 'number') {
+ if (typeof y !== 'number') {
this.write('\x1b[' + (x + 1) + 'G');
} else {
this.write('\x1b[' + (y + 1) + ';' + (x + 1) + 'H');