[PR #747] [CLOSED] fix(core): make lineInfo.lineStarts byte-based across wrap modes #1535

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

📋 Pull Request Information

Original PR: https://github.com/anomalyco/opentui/pull/747
Author: @simonklee
Created: 2/27/2026
Status: Closed

Base: mainHead: fix-609


📝 Commits (2)

  • 57118ab fix(core): make lineInfo.lineStarts byte-based across wrap modes
  • 25b8e5a fixup! fix(core): make lineInfo.lineStarts byte-based across wrap modes

📊 Changes

3 files changed (+376 additions, -21 deletions)

View changed files

📝 packages/core/src/text-buffer-view.test.ts (+68 -0)
📝 packages/core/src/zig/tests/text-buffer-view_test.zig (+145 -0)
📝 packages/core/src/zig/text-buffer-view.zig (+163 -21)

📄 Description

lineInfo.lineStarts was emitted from display-column offsets in wrap/no-wrap paths,
which could split UTF-8 sequences at visual line boundaries for CJK/emoji text.
Track byte offsets alongside column offsets during virtual line construction and
write cached line starts from byte positions.

Close #609
Close #610


🔄 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/747 **Author:** [@simonklee](https://github.com/simonklee) **Created:** 2/27/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix-609` --- ### 📝 Commits (2) - [`57118ab`](https://github.com/anomalyco/opentui/commit/57118ab4ce172f25d0df7aab3935157915903a5f) fix(core): make lineInfo.lineStarts byte-based across wrap modes - [`25b8e5a`](https://github.com/anomalyco/opentui/commit/25b8e5a6459c6beda65931e7464996c564387a00) fixup! fix(core): make lineInfo.lineStarts byte-based across wrap modes ### 📊 Changes **3 files changed** (+376 additions, -21 deletions) <details> <summary>View changed files</summary> 📝 `packages/core/src/text-buffer-view.test.ts` (+68 -0) 📝 `packages/core/src/zig/tests/text-buffer-view_test.zig` (+145 -0) 📝 `packages/core/src/zig/text-buffer-view.zig` (+163 -21) </details> ### 📄 Description lineInfo.lineStarts was emitted from display-column offsets in wrap/no-wrap paths, which could split UTF-8 sequences at visual line boundaries for CJK/emoji text. Track byte offsets alongside column offsets during virtual line construction and write cached line starts from byte positions. Close #609 Close #610 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-14 09:41:57 +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#1535
No description provided.