From 91efb1bbf2ab8f4db86f3e93a5c82bf541f1cc67 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Sun, 26 Mar 2017 01:38:23 -0600 Subject: [PATCH] bugfix for non-TTY case --- index.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index ad5c29f..20b974a 100644 --- a/index.js +++ b/index.js @@ -37,6 +37,7 @@ var form = { , _prompt: '' , _input: [] , _inputIndex: 0 + , isTTY: rws.isTTY , cursorTo: function (x, y) { if ('number' !== typeof x || (0 !== x && !x)) { throw new Error('cursorTo(x[, y]): x is not optional and must be a number'); @@ -245,8 +246,6 @@ var form = { var x; if (CTRL_C === ch) { - console.log(""); - console.log("received CTRL+C and quit"); process.exit(0); callback(new Error("cancelled")); } @@ -313,7 +312,7 @@ var form = { if (cbs.value) { ws._input = require('spliddit')(cbs.value); - ws._inputIndex = ws.input.length; + ws._inputIndex = ws._input.length; callback(); return; }