You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Four follow-up fixes from code review on PR #106:
1. clipAnsi docstring: updated to document the partial SGR reset (\x1b[22;39m)
and explain why the background is deliberately preserved. Added note about
code-point iteration to match the new implementation.
2. clipAnsi surrogate pairs: the loop now advances i by codePointAt() width
(2 UTF-16 units for non-BMP code points, 1 otherwise) instead of always
i++. This prevents clipping in the middle of a surrogate pair when
maxVisible falls between the two halves of an emoji (e.g. the 🔍 prefix
used in filter lines).
3. Section row maxLabelChars === 0: instead of incrementing usedLines without
pushing to lines[], the code now pushes blank placeholder strings (same
count as sectionCost) to keep lines[] in sync with usedLines. Without
this, the footer-padding loop adds too few blank lines and the output is
sectionCost lines shorter than termHeight.
4. Repo row maxLeftVisible floor: Math.max(4, …) → Math.max(1, …).
The old floor of 4 could exceed the available width on very narrow
terminals (termWidth < 4 + countLen + barAdjust), reintroducing wrapping.
0 commit comments