Skip to content

[diffs/edit] Fix PieceTable CRLF metadata and resulting search range drift#990

Merged
ije merged 2 commits into
beta-1.3from
ije/fix-piecetable-crlf
Jul 15, 2026
Merged

[diffs/edit] Fix PieceTable CRLF metadata and resulting search range drift#990
ije merged 2 commits into
beta-1.3from
ije/fix-piecetable-crlf

Conversation

@ije

@ije ije commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

PieceTable CRLF line metadata (5, spanning piece-table and search
coverage) — line-break bookkeeping goes stale when a CRLF pair is split or
assembled across edits (deleting exactly the \n of a pair, inserting between
the \r and \n, assembling CRLF from two separate inserts, plus a
CRLF-biased fuzz oracle), and the same stale metadata drives search astray
(shifted or missing match ranges) even though getText() stays correct.

Fixed PieceTable CRLF metadata and resulting search range drift.

  • Piece/tree metadata now reconciles CRLF pairs across piece seams while preserving lone \r breaks.
  • Prevented unsafe coalescing across separately appended CRLF boundaries.

@vercel

vercel Bot commented Jul 15, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
pierre-docs-diffs Ready Ready Preview Jul 15, 2026 4:40pm
pierre-docs-diffshub Ready Ready Preview Jul 15, 2026 4:40pm
pierre-docs-trees Ready Ready Preview Jul 15, 2026 4:40pm
pierrejs-diff-demo Ready Ready Preview Jul 15, 2026 4:40pm

Request Review

@ije ije changed the title [diffs/edit] Fix PieceTable CRLF metadata and resulting search range drift. [diffs/edit] Fix PieceTable CRLF metadata and resulting search range drift Jul 15, 2026
@ije
ije requested review from amadeus, fat and necolas July 15, 2026 14:08
@ije

ije commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Can't wait for the next one!

Reviewed commit: 85b52ef208

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

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.

2 participants