Wrap up a couple writes to a single
This commit is contained in:
parent
52405a2f51
commit
d3a6ce8645
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue