From d3a6ce864519d507b0caa9341e3c8674e5ffa418 Mon Sep 17 00:00:00 2001 From: Bryan Ashby Date: Sat, 2 Sep 2017 09:53:12 -0600 Subject: [PATCH] Wrap up a couple writes to a single --- core/menu_module.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/core/menu_module.js b/core/menu_module.js index 1f350564..eabc177e 100644 --- a/core/menu_module.js +++ b/core/menu_module.js @@ -136,13 +136,19 @@ exports.MenuModule = class MenuModule extends PluginModule { } beforeArt(cb) { + let initSeq = ''; + if(_.isNumber(this.menuConfig.options.baudRate)) { // :TODO: some terminals not supporting cterm style emulated baud rate end up displaying a broken ESC sequence or a single "r" here - this.client.term.rawWrite(ansi.setEmulatedBaudRate(this.menuConfig.options.baudRate)); + initSeq += ansi.setEmulatedBaudRate(this.menuConfig.options.baudRate); } if(this.cls) { - this.client.term.rawWrite(ansi.resetScreen()); + initSeq += ansi.resetScreen(); + } + + if(initSeq) { + this.client.term.rawWrite(initSeq); } return cb(null);