mirror of
https://github.com/tiennm99/ccstatusline.git
synced 2026-09-03 14:18:04 +00:00
Minor bug fix for padding
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user