Make the terminal go to new line if the width of the term is greater than the art width
This commit is contained in:
11
core/art.js
11
core/art.js
@@ -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,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user