Minor bug fix for padding

This commit is contained in:
Matthew Breedlove
2025-08-12 03:28:59 -04:00
parent e0012bc0eb
commit a69a6997d0
2 changed files with 9 additions and 3 deletions
+7 -2
View File
@@ -718,9 +718,14 @@ export function renderStatusLine(
elem.content +
applyColorsWithOverride(padding, undefined, elem.item?.backgroundColor);
finalElements.push(paddedContent);
} else if (padding) {
// Wrap padding in ANSI reset codes to prevent trimming
// This ensures leading spaces aren't trimmed by terminals
const protectedPadding = chalk.reset(padding);
finalElements.push(protectedPadding + elem.content + protectedPadding);
} else {
// No colors or no padding
finalElements.push(padding + elem.content + padding);
// No padding
finalElements.push(elem.content);
}
}
});