fix(quit): removes process.exit in favor of stdin.unref

Closes #89
This commit is contained in:
Dan Kaplun 2015-06-26 23:10:20 -04:00
parent ed0fdc57ac
commit 94d8230e60

View File

@ -74,23 +74,7 @@ Slap.prototype.open = Promise.method(function (filePath, current) {
Slap.prototype.quit = function () {
var self = this;
var quit = Promise.resolve();
if (Editor.highlightClient) quit = quit
.return(Editor.highlightClient)
.then(function (client) {
if (!client) return;
client.dontRespawn = true;
self.panes.forEach(function (pane) { pane.detach(); });
});
quit
.delay(20) // FIXME: .delay(20) hack for I/O flush
.then(function () { process.exit(0); })
.done();
// this.program.input.removeAllListeners();
self.screen.program.input.unref();
return this;
};
Slap.prototype.help = function () {