diff --git a/lib/readline.js b/lib/readline.js index 2de74397be6..02d15527cd8 100644 --- a/lib/readline.js +++ b/lib/readline.js @@ -656,8 +656,13 @@ Interface.prototype._ttyWrite = function(s, key) { self.pause(); self.emit('SIGCONT'); } + // explictly re-enable "raw mode" and move the cursor to the correct + // position. See https://github.com/joyent/node/issues/3295. + self._setRawMode(true); + self._refreshLine(); }; })(this)); + this._setRawMode(false); process.kill(process.pid, 'SIGTSTP'); } break;