[PR #482] [CLOSED] feat(core): add Intl.Segmenter for grapheme cluster handling #1351

Closed
opened 2026-03-14 09:31:59 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/anomalyco/opentui/pull/482
Author: @GreyElaina
Created: 1/7/2026
Status: Closed

Base: mainHead: core-grapheme-segmenter


📝 Commits (1)

  • 318db8b feat(core): add Intl.Segmenter for grapheme cluster handling

📊 Changes

4 files changed (+505 additions, -6 deletions)

View changed files

📝 bun.lock (+416 -4)
📝 packages/core/package.json (+1 -0)
packages/core/src/lib/grapheme-segmenter.ts (+85 -0)
📝 packages/core/src/lib/parse.keypress.ts (+3 -2)

📄 Description

Adds Intl.Segmenter based grapheme cluster handling for proper Unicode text segmentation.

Changes

  • Add grapheme-segmenter.ts utility using Intl.Segmenter
  • Integrate with parse.keypress.ts for correct character boundary detection

This is foundational work for proper emoji and CJK text handling in input buffers.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/anomalyco/opentui/pull/482 **Author:** [@GreyElaina](https://github.com/GreyElaina) **Created:** 1/7/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `core-grapheme-segmenter` --- ### 📝 Commits (1) - [`318db8b`](https://github.com/anomalyco/opentui/commit/318db8b6997f9e7c18a069c2a69e8abe3f106839) feat(core): add Intl.Segmenter for grapheme cluster handling ### 📊 Changes **4 files changed** (+505 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `bun.lock` (+416 -4) 📝 `packages/core/package.json` (+1 -0) ➕ `packages/core/src/lib/grapheme-segmenter.ts` (+85 -0) 📝 `packages/core/src/lib/parse.keypress.ts` (+3 -2) </details> ### 📄 Description Adds `Intl.Segmenter` based grapheme cluster handling for proper Unicode text segmentation. ## Changes - Add `grapheme-segmenter.ts` utility using `Intl.Segmenter` - Integrate with `parse.keypress.ts` for correct character boundary detection This is foundational work for proper emoji and CJK text handling in input buffers. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-14 09:31:59 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/opentui#1351
No description provided.