mirror of
https://github.com/tiennm99/ccstatusline.git
synced 2026-09-03 08:18:26 +00:00
Minor bug fix for padding
This commit is contained in:
+2
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ccstatusline",
|
||||
"version": "1.1.5",
|
||||
"version": "1.1.6",
|
||||
"description": "A customizable status line formatter for Claude Code CLI",
|
||||
"module": "src/ccstatusline.ts",
|
||||
"type": "module",
|
||||
@@ -12,6 +12,7 @@
|
||||
],
|
||||
"scripts": {
|
||||
"start": "bun run patch && bun run src/ccstatusline.ts",
|
||||
"statusline": "bun run src/ccstatusline.ts",
|
||||
"patch": "patch-package",
|
||||
"build": "bun run patch && rm -rf dist/* && bun build src/ccstatusline.ts --target=node --outfile=dist/ccstatusline.js --target-version=14",
|
||||
"prepublishOnly": "bun run build"
|
||||
|
||||
@@ -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