From 2b17ab724d2fd2805b4e53b5efb761caba59f193 Mon Sep 17 00:00:00 2001 From: Eugene Obrezkov Date: Fri, 29 Apr 2016 14:08:14 +0300 Subject: [PATCH] fix(deck): Fix issue with restoring screen after exit --- src/Deck.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Deck.js b/src/Deck.js index eed6e10..96880ba 100644 --- a/src/Deck.js +++ b/src/Deck.js @@ -45,7 +45,7 @@ export default class Deck { * }); */ constructor(declaration) { - const {cursor = Cursor.create().reset().saveScreen().hideCursor()} = declaration; + const {cursor = Cursor.create().saveScreen().reset().hideCursor()} = declaration; const {shapes = [], animations = [], slides = []} = declaration; this._currentSlideIndex = 0; @@ -143,7 +143,7 @@ export default class Deck { * Closes the presentation and returns to terminal. */ exit() { - this._cursor.restoreScreen().showCursor(); + this._cursor.showCursor().restoreScreen().reset(); process.exit(0); }