Skip to content

end+1 fix did not close the duplicate-character bug in case-conversion blocks #15

Description

@Egbert-Azure

The end+1 → end change in UpperCaseBlock/LowerCaseBlock/SentenceCaseBlock (f3cce7e, fab4b20, e8b2456) was necessary but not sufficient. The duplicate-character symptom it targeted still reproduces: after conversion, GetTextSize() returns 5 and GetNumberofParagraphs() returns 2, where 4 and 1 are expected.

Something in the DeleteBlock() → InsertWordStarString() reinsert path independently reproduces the duplicate-paragraph symptom, separate from the boundary calculation.

Same stale-index pattern as ^KZ: a position is captured, the document is mutated, the original position is reused without recomputation. Per the ^KZ lesson, no further fix attempt until there's a reproducing test that isolates the reinsert path specifically — a second speculative one-liner here risks the same regression cascade.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    stale-indexPosition captured, document mutated, position reused without recomputation

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions