Additional code changes from PR

This commit is contained in:
Nathan Byrd 2022-03-28 22:20:55 -05:00
parent 94e4f1240e
commit e9d22b0688
2 changed files with 4 additions and 1 deletions

View File

@ -215,6 +215,9 @@ function ANSIEscapeParser(options) {
}
self.reset = function(input) {
self.column = 1;
self.row = Math.min(options?.startRow ?? 1, self.termHeight);
self.parseState = {
// ignore anything past EOF marker, if any
buffer : input.split(String.fromCharCode(0x1a), 1)[0],

View File

@ -103,7 +103,7 @@ exports.MenuModule = class MenuModule extends PluginModule {
return callback(Errors.MissingConfig('Prompt specified but no "promptConfig" block found'));
}
const options = self.menuConfig.config;
const options = Object.assign({}, self.menuConfig.config);
if(_.isNumber(artData?.height)) {
options.startRow = artData.height + 1;