Skip to content

render invalid codepoints safely#93

Merged
forketyfork merged 2 commits intomainfrom
fix/render-invalid-codepoints
Jan 12, 2026
Merged

render invalid codepoints safely#93
forketyfork merged 2 commits intomainfrom
fix/render-invalid-codepoints

Conversation

@forketyfork
Copy link
Owner

Solution:

  • Make session and renderer cleanup idempotent so double teardown paths can’t free GPU resources twice.
  • Sanitize invalid Unicode scalars to U+FFFD before shaping and ignore non-text cells when rendering to stop bogus replacement glyphs.
  • Ensure main only deinitializes constructed sessions and document the cleanup/unicode behavior; kept tests green with zig build && zig build test.

Prompt: When I run `nvim <folder>` in our terminal, the app fails with a segmentation fault.

Solution: Make session and renderer cleanup idempotent to avoid double frees; sanitize invalid Unicode scalars before shaping and ignore non-text cells during rendering; ensure main cleanup only deinitializes constructed sessions and document the changes.
Prompt: Analyze this session to extract learnings for CLAUDE.md.

Solution: Document renderer safeguards for non-codepoint cells and Unicode sanitization; add known pitfall about making session teardown idempotent and gating deinit to constructed sessions.
@forketyfork forketyfork merged commit 3e4d3b8 into main Jan 12, 2026
5 checks passed
@forketyfork forketyfork deleted the fix/render-invalid-codepoints branch January 12, 2026 13:52
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