Fixed missing ansi codes causing formatting misses

This commit is contained in:
Nathan Byrd
2023-09-24 20:39:57 +00:00
parent 72a8546d74
commit 450ba65565
2 changed files with 18 additions and 11 deletions

View File

@@ -338,6 +338,17 @@ function display(client, art, options, cb) {
});
});
ansiParser.on('insert columns', (row, startCol, numCols) => {
_.forEach(mciMap, (mciInfo, mapKey) => {
if (mciInfo.position[0] === row && mciInfo.position[1] >= startCol) {
mciInfo.position[1] += numCols;
if(mciInfo.position[1] > client.term.termWidth) {
delete mciMap[mapKey];
}
}
});
});
// Clear the screen, removing any MCI's
ansiParser.on('clear screen', () => {
_.forEach(mciMap, (mciInfo, mapKey) => {