From 1b0891b0c3acc0a77ce68b2bb7b0c0290d21f0fb Mon Sep 17 00:00:00 2001 From: Bryan Ashby Date: Sat, 2 Jul 2016 23:08:54 -0600 Subject: [PATCH] Set baud emu before cls such that terms without support don't show garbage... most of the time --- core/menu_module.js | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/core/menu_module.js b/core/menu_module.js index 03f7e2d6..fc204001 100644 --- a/core/menu_module.js +++ b/core/menu_module.js @@ -246,15 +246,20 @@ MenuModule.prototype.leave = function() { this.detachViewControllers(); }; -MenuModule.prototype.beforeArt = function(cb) { - if(this.cls) { - this.client.term.write(ansi.resetScreen()); - } - +MenuModule.prototype.beforeArt = function(cb) { + // + // Set emulated baud rate - note that some terminals will display + // part of the ESC sequence here (generally a single 'r') if they + // do not support cterm style baud rates + // if(_.isNumber(this.menuConfig.options.baudRate)) { this.client.term.write(ansi.setEmulatedBaudRate(this.menuConfig.options.baudRate)); } + if(this.cls) { + this.client.term.write(ansi.resetScreen()); + } + return cb(null); };