Wrap up a couple writes to a single
This commit is contained in:
@@ -136,13 +136,19 @@ exports.MenuModule = class MenuModule extends PluginModule {
|
|||||||
}
|
}
|
||||||
|
|
||||||
beforeArt(cb) {
|
beforeArt(cb) {
|
||||||
|
let initSeq = '';
|
||||||
|
|
||||||
if(_.isNumber(this.menuConfig.options.baudRate)) {
|
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
|
// :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) {
|
if(this.cls) {
|
||||||
this.client.term.rawWrite(ansi.resetScreen());
|
initSeq += ansi.resetScreen();
|
||||||
|
}
|
||||||
|
|
||||||
|
if(initSeq) {
|
||||||
|
this.client.term.rawWrite(initSeq);
|
||||||
}
|
}
|
||||||
|
|
||||||
return cb(null);
|
return cb(null);
|
||||||
|
|||||||
Reference in New Issue
Block a user