@xynogen/pix-pretty 1.7.0 → 1.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/diff-render.ts +4 -13
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xynogen/pix-pretty",
3
- "version": "1.7.0",
3
+ "version": "1.7.1",
4
4
  "description": "Enhanced tool output rendering with syntax highlighting, file icons, tree views, FFF search, and paste chip formatting",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
@@ -56,7 +56,6 @@ const BG_ADD_W = envBg("DIFF_BG_ADD_HL", "\x1b[48;2;35;75;50m"); // word emphasi
56
56
  const BG_DEL_W = envBg("DIFF_BG_DEL_HL", "\x1b[48;2;80;35;35m");
57
57
  const BG_GUTTER_ADD = envBg("DIFF_BG_GUTTER_ADD", "\x1b[48;2;18;32;26m");
58
58
  const BG_GUTTER_DEL = envBg("DIFF_BG_GUTTER_DEL", "\x1b[48;2;38;22;22m");
59
- const BG_EMPTY = "\x1b[48;2;18;18;18m"; // filler rows when one side is shorter
60
59
 
61
60
  const FG_ADD = envFg("DIFF_FG_ADD", "\x1b[38;2;100;180;120m"); // desaturated green
62
61
  const FG_DEL = envFg("DIFF_FG_DEL", "\x1b[38;2;200;100;100m"); // desaturated red
@@ -912,21 +911,13 @@ export async function renderSplit(
912
911
  }
913
912
 
914
913
  const maxRowsN = Math.max(lResult.bodyRows.length, rResult.bodyRows.length);
915
- const leftIsEmpty = !r.left;
916
- const rightIsEmpty = !r.right;
917
914
  for (let row = 0; row < maxRowsN; row++) {
918
915
  const lg = row === 0 ? lResult.gutter : lResult.contGutter;
919
916
  const rg = row === 0 ? rResult.gutter : rResult.contGutter;
920
- const lb =
921
- lResult.bodyRows[row] ??
922
- (leftIsEmpty
923
- ? stripes(cw, stripeRow)
924
- : `${BG_EMPTY}${" ".repeat(cw)}${RST}`);
925
- const rb =
926
- rResult.bodyRows[row] ??
927
- (rightIsEmpty
928
- ? stripes(cw, stripeRow)
929
- : `${BG_EMPTY}${" ".repeat(cw)}${RST}`);
917
+ // A missing body row means this side has no content at this visual row
918
+ // (other side wrapped longer, or the side is empty) — always hatch it.
919
+ const lb = lResult.bodyRows[row] ?? stripes(cw, stripeRow);
920
+ const rb = rResult.bodyRows[row] ?? stripes(cw, stripeRow);
930
921
  out.push(`${lg}${lb}${DIVIDER}${rg}${rb}${RST}`);
931
922
  stripeRow++;
932
923
  }