[PR #329] [MERGED] fix editor grapheme cursor + wcwidth/no_zwj modes #1239

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

📋 Pull Request Information

Original PR: https://github.com/anomalyco/opentui/pull/329
Author: @kommander
Created: 11/19/2025
Status: Merged
Merged: 11/19/2025
Merged by: @kommander

Base: mainHead: fix-editor-grapheme-cursor


📝 Commits (10+)

📊 Changes

23 files changed (+2327 additions, -353 deletions)

View changed files

📝 packages/core/dev/print-env-vars.ts (+13 -1)
📝 packages/core/docs/env-vars.md (+16 -0)
📝 packages/core/src/examples/editor-demo.ts (+3 -0)
📝 packages/core/src/lib/env.ts (+2 -2)
📝 packages/core/src/zig.ts (+14 -0)
📝 packages/core/src/zig/bench/text-chunk-graphemes_bench.zig (+1 -0)
📝 packages/core/src/zig/bench/utf8_bench.zig (+12 -12)
📝 packages/core/src/zig/buffer.zig (+8 -2)
📝 packages/core/src/zig/edit-buffer.zig (+2 -2)
📝 packages/core/src/zig/terminal.zig (+16 -1)
📝 packages/core/src/zig/test.zig (+4 -0)
📝 packages/core/src/zig/tests/edit-buffer_test.zig (+405 -44)
📝 packages/core/src/zig/tests/editor-view_test.zig (+166 -88)
📝 packages/core/src/zig/tests/terminal_test.zig (+6 -2)
📝 packages/core/src/zig/tests/text-buffer-drawing_test.zig (+422 -60)
packages/core/src/zig/tests/utf8_no_zwj_test.zig (+260 -0)
📝 packages/core/src/zig/tests/utf8_test.zig (+63 -63)
packages/core/src/zig/tests/utf8_wcwidth_test.zig (+362 -0)
📝 packages/core/src/zig/text-buffer-iterators.zig (+13 -0)
📝 packages/core/src/zig/text-buffer-segment.zig (+4 -2)

...and 3 more files

📄 Description

No description provided


🔄 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/329 **Author:** [@kommander](https://github.com/kommander) **Created:** 11/19/2025 **Status:** ✅ Merged **Merged:** 11/19/2025 **Merged by:** [@kommander](https://github.com/kommander) **Base:** `main` ← **Head:** `fix-editor-grapheme-cursor` --- ### 📝 Commits (10+) - [`bdbeee0`](https://github.com/anomalyco/opentui/commit/bdbeee09ba4e3a83e69d4ffce75f2a3f1e49a79c) reproduce - [`a76e796`](https://github.com/anomalyco/opentui/commit/a76e796316e86356434ffba4a67613327f5ff712) maybe fix - [`0f8ad48`](https://github.com/anomalyco/opentui/commit/0f8ad48a26773e4ec7dd60cbfb60c4792cbf26db) stash - [`6e3b941`](https://github.com/anomalyco/opentui/commit/6e3b941fb975532b16c6576b07a6d141bda2cfa6) tmux wcwidth - [`7644daa`](https://github.com/anomalyco/opentui/commit/7644daa849c6fa669505c17fff67dcc0f0e66874) find wrap breaks with width method - [`dc4a66e`](https://github.com/anomalyco/opentui/commit/dc4a66e981aeb09da00ef43d58dbcfdb71e088d6) wcwidth mode a single codepoints - [`da5d0d8`](https://github.com/anomalyco/opentui/commit/da5d0d8e6b7ab5a26d0af142ea9dc149f017f66e) wcwidth zwj - [`4c80a13`](https://github.com/anomalyco/opentui/commit/4c80a130da129e7096595816c12f3eeb5ab7e3a3) check rendering - [`aedf807`](https://github.com/anomalyco/opentui/commit/aedf807618307ae315ee18f0e448b7a1544ec84a) stash - [`b43d8b0`](https://github.com/anomalyco/opentui/commit/b43d8b0801c6abec7df8e5c9f381199ee48238b3) refactor ### 📊 Changes **23 files changed** (+2327 additions, -353 deletions) <details> <summary>View changed files</summary> 📝 `packages/core/dev/print-env-vars.ts` (+13 -1) 📝 `packages/core/docs/env-vars.md` (+16 -0) 📝 `packages/core/src/examples/editor-demo.ts` (+3 -0) 📝 `packages/core/src/lib/env.ts` (+2 -2) 📝 `packages/core/src/zig.ts` (+14 -0) 📝 `packages/core/src/zig/bench/text-chunk-graphemes_bench.zig` (+1 -0) 📝 `packages/core/src/zig/bench/utf8_bench.zig` (+12 -12) 📝 `packages/core/src/zig/buffer.zig` (+8 -2) 📝 `packages/core/src/zig/edit-buffer.zig` (+2 -2) 📝 `packages/core/src/zig/terminal.zig` (+16 -1) 📝 `packages/core/src/zig/test.zig` (+4 -0) 📝 `packages/core/src/zig/tests/edit-buffer_test.zig` (+405 -44) 📝 `packages/core/src/zig/tests/editor-view_test.zig` (+166 -88) 📝 `packages/core/src/zig/tests/terminal_test.zig` (+6 -2) 📝 `packages/core/src/zig/tests/text-buffer-drawing_test.zig` (+422 -60) ➕ `packages/core/src/zig/tests/utf8_no_zwj_test.zig` (+260 -0) 📝 `packages/core/src/zig/tests/utf8_test.zig` (+63 -63) ➕ `packages/core/src/zig/tests/utf8_wcwidth_test.zig` (+362 -0) 📝 `packages/core/src/zig/text-buffer-iterators.zig` (+13 -0) 📝 `packages/core/src/zig/text-buffer-segment.zig` (+4 -2) _...and 3 more files_ </details> ### 📄 Description _No description provided_ --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-14 09:25:54 +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#1239
No description provided.