Fix MRC MLTEV padding bug
This commit is contained in:
parent
136854017a
commit
ce16f17081
|
@ -178,14 +178,17 @@ exports.getModule = class mrcModule extends MenuModule {
|
||||||
const messageLength = stripMciColorCodes(message).length;
|
const messageLength = stripMciColorCodes(message).length;
|
||||||
const chatWidth = chatLogView.dimens.width;
|
const chatWidth = chatLogView.dimens.width;
|
||||||
let padAmount = 0;
|
let padAmount = 0;
|
||||||
|
let spaces = 2;
|
||||||
|
|
||||||
if (messageLength > chatWidth) {
|
if (messageLength > chatWidth) {
|
||||||
padAmount = chatWidth - (messageLength % chatWidth);
|
padAmount = chatWidth - (messageLength % chatWidth) - spaces;
|
||||||
} else {
|
} else {
|
||||||
padAmount = chatWidth - messageLength;
|
padAmount = chatWidth - messageLength - spaces ;
|
||||||
}
|
}
|
||||||
|
|
||||||
const padding = ' |00' + ' '.repeat(padAmount - 2);
|
if (padAmount < 0) padAmount = 0;
|
||||||
|
|
||||||
|
const padding = ' |00' + ' '.repeat(padAmount);
|
||||||
chatLogView.addText(pipeToAnsi(message + padding));
|
chatLogView.addText(pipeToAnsi(message + padding));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue