Skip to content

Commit

Permalink
check for setRawMode on spawn().
Browse files Browse the repository at this point in the history
  • Loading branch information
chjj committed Jul 31, 2015
1 parent bdb3f09 commit be8ad38
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/widgets/screen.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit be8ad38

Please sign in to comment.