Skip to content

fix: preserve trailing zero-width caret geometry - #22

Merged
tiensonqin merged 1 commit into
mainfrom
fix/1794093324-trailing-zero-width-caret
Nov 8, 2026
Merged

tiensonqin merged 1 commit into
mainfrom
fix/1794093324-trailing-zero-width-caret

Conversation

@tiensonqin

Copy link
Copy Markdown

Summary

Keep the full visible glyph advance when a shaped line ends in U+200B and the trailing anchor shares a cluster with visible text. Caret positions, hit testing and selection now use the same fraction. Ordinary clusters and existing RTL inversion are unchanged.

Four internal text files only; the sidebar measure-cache fix is not included.

Testing

  • Go 1.27.3, CGO_ENABLED=0: the single synthetic shared-cluster regression failed before the fix and passes after it; targeted internal/text and ui tests pass.
  • Darwin/arm64, Linux/amd64 and Windows/amd64 normal + production builds/vet pass. Filtered WASM vet/build passes; build excludes the CLI and packages containing only tests.
  • Full go test ./... fails only TestLocales (x-Test versus en-001) on BOTH this branch and clean fca5c736; no suppression or preference changes.
  • A separate combined Logseq candidate passed one bounded real MyGo/native-worker caret trial. This is integration evidence, not exhaustive platform-shaping or RTL runtime coverage.
  • Release counter size: macOS unchanged; Linux +4,096 B; Windows +1,536 B. hello is byte-identical on all three targets. Linker -dumpdep, symbol and section comparisons attribute growth to shared native text-layout/Line metadata and ELF/PE alignment; no new opt-in dependency or callable-symbol reachability.
  • Formatting and diff checks pass. No dependency/compiler repin.

Tested on:

  • macOS
  • Windows — cross-build/vet only
  • Linux — cross-build/vet only
  • Web — filtered WASM build/vet only
  • Other: none

AI disclosure

  • Tool and model: Devin by Cognition AI; the underlying model/version is not exposed by this session.
  • Used for: implementation, the regression case, review, validation and this description.
  • A human read every line of this change and can explain it.

Link to Devin session: https://app.devin.ai/sessions/949a417dd06241acb1e04361de5b162b
Open in Devin Desktop: https://app.devin.ai/desktop/session/949a417dd06241acb1e04361de5b162b?variant=devin
Requested by: @tiensonqin

@devin-ai-integration

Copy link
Copy Markdown

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@tiensonqin
tiensonqin merged commit 5c865d2 into main Nov 8, 2026
5 checks passed
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.

1 participant