Make the terminal go to new line if the width of the term is greater than the art width

This commit is contained in:
Nathan Byrd
2023-08-25 14:24:47 -05:00
parent 0b157ddd1b
commit ccaaa71e23
2 changed files with 16 additions and 16 deletions

View File

@@ -280,18 +280,11 @@ function display(client, art, options, cb) {
}
}
// Use width from SAUCE if available - if the width is less than the term width,
// we need to set that as the width for the parser so that wide terminals
// display correctly
let parseWidth = getWidthFromSAUCE(options.sauce);
if(_.isNil(parseWidth) || parseWidth > client.term.termWidth) {
parseWidth = client.term.termWidth;
}
const ansiParser = new aep.ANSIEscapeParser({
mciReplaceChar: options.mciReplaceChar,
termHeight: client.term.termHeight,
termWidth: parseWidth,
termWidth: client.term.termWidth,
artWidth: getWidthFromSAUCE(options.sauce),
trailingLF: options.trailingLF,
startRow: options.startRow,
});