check for setRawMode on spawn().

This commit is contained in:
Christopher Jeffrey 2015-07-30 23:43:47 -07:00
parent bdb3f098ca
commit be8ad38e6c
1 changed files with 6 additions and 2 deletions

View File

@ -1722,13 +1722,17 @@ Screen.prototype.spawn = function(file, args, options) {
var write = program.output.write;
program.output.write = function() {};
program.input.pause();
program.input.setRawMode(false);
if (program.input.setRawMode) {
program.input.setRawMode(false);
}
var resume = function() {
if (resume.done) return;
resume.done = true;
program.input.setRawMode(true);
if (program.input.setRawMode) {
program.input.setRawMode(true);
}
program.input.resume();
program.output.write = write;