Skip to content

fix: cache breakable fit advances per mode#161

Open
hiSandog wants to merge 1 commit intochenglou:mainfrom
hiSandog:fix/breakable-fit-cache-20260430
Open

fix: cache breakable fit advances per mode#161
hiSandog wants to merge 1 commit intochenglou:mainfrom
hiSandog:fix/breakable-fit-cache-20260430

Conversation

@hiSandog
Copy link
Copy Markdown
Contributor

Summary

  • cache breakable fit advances separately for each fit mode
  • preserve the long segment-prefix fallback under the pair-context cache slot
  • add a regression test covering repeated calls across sum, pair, and prefix modes

Fixes #137.

Validation

  • npx tsc --noEmit
  • npx oxlint --type-aware src
  • git diff --check

Note: bun is not installed in this environment, so I could not run bun test src/layout.test.ts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

getSegmentBreakableFitAdvances: cached result does not distinguish BreakableFitMode

1 participant