claude-token-saver 2.8.2 → 2.8.3
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.
package/package.json
CHANGED
|
@@ -401,5 +401,13 @@ export function formatReport(data, { color = true, verbose = false, timer = true
|
|
|
401
401
|
// digits from a prior frame leaking past the new shorter timer text.
|
|
402
402
|
// \x1b[K is the standard "erase from cursor to EOL" CSI; safe on any
|
|
403
403
|
// ANSI-compatible terminal and a no-op when stdout isn't a TTY.
|
|
404
|
-
|
|
404
|
+
// Defensive overwrite — terminals that miscount emoji width (JetBrains JediTerm
|
|
405
|
+
// is the known case, but others surface periodically) leave the cursor at the
|
|
406
|
+
// wrong column, which makes trailing `\x1b[K` erase the wrong region and
|
|
407
|
+
// leftover bytes from the previous frame fuse with the new one ("4:54" + "8"
|
|
408
|
+
// → "4:548"). Appending a run of spaces overwrites those leftover bytes
|
|
409
|
+
// positionally without any clear-then-redraw step (so no flicker), and is
|
|
410
|
+
// invisible on terminals that already redraw cleanly. `\x1b[K` still mops up
|
|
411
|
+
// anything beyond the padding.
|
|
412
|
+
return segs.join(' · ') + ' '.repeat(40) + '\x1b[K';
|
|
405
413
|
}
|