From be8ad38e6cc1ddfe24ea21b28f32163b3e61eb65 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Thu, 30 Jul 2015 23:43:47 -0700 Subject: [PATCH] check for setRawMode on spawn(). --- lib/widgets/screen.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/widgets/screen.js b/lib/widgets/screen.js index ca95a64..03c1814 100644 --- a/lib/widgets/screen.js +++ b/lib/widgets/screen.js @@ -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;