[PR #804] [MERGED] fix: out-of-bounds access in word wrap rollback with CJK text #1577

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

📋 Pull Request Information

Original PR: https://github.com/anomalyco/opentui/pull/804
Author: @simonklee
Created: 3/12/2026
Status: Merged
Merged: 3/13/2026
Merged by: @kommander

Base: mainHead: overflow-bounds-check


📝 Commits (5)

  • fe38a05 fix: out-of-bounds access in word wrap rollback with CJK text
  • fa1b29d add regression
  • 558b0f6 better regression
  • 96257d4 reset last wrap bookmark
  • 0b7e06c cleanup tests

📊 Changes

2 files changed (+44 additions, -1 deletions)

View changed files

📝 packages/core/src/zig/tests/word-wrap-editing_test.zig (+38 -0)
📝 packages/core/src/zig/text-buffer-view.zig (+6 -1)

📄 Description

last_wrap_chunk_count could become stale relative to the current virtual line's actual chunk count.

I added a regression + guard + fix to clear the staleness thing altogether.


🔄 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/804 **Author:** [@simonklee](https://github.com/simonklee) **Created:** 3/12/2026 **Status:** ✅ Merged **Merged:** 3/13/2026 **Merged by:** [@kommander](https://github.com/kommander) **Base:** `main` ← **Head:** `overflow-bounds-check` --- ### 📝 Commits (5) - [`fe38a05`](https://github.com/anomalyco/opentui/commit/fe38a0550de800e005fb950ef80ec1d2b796bcb5) fix: out-of-bounds access in word wrap rollback with CJK text - [`fa1b29d`](https://github.com/anomalyco/opentui/commit/fa1b29da28f1d9897fc48b733e27aaf416de3162) add regression - [`558b0f6`](https://github.com/anomalyco/opentui/commit/558b0f6e2752f2ce93e2a6e0b52eefadfbde6fa4) better regression - [`96257d4`](https://github.com/anomalyco/opentui/commit/96257d421912f08e138d6b7d76565f21c26ed366) reset last wrap bookmark - [`0b7e06c`](https://github.com/anomalyco/opentui/commit/0b7e06c905934d057ea94037f48a132006ce6a42) cleanup tests ### 📊 Changes **2 files changed** (+44 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `packages/core/src/zig/tests/word-wrap-editing_test.zig` (+38 -0) 📝 `packages/core/src/zig/text-buffer-view.zig` (+6 -1) </details> ### 📄 Description last_wrap_chunk_count could become stale relative to the current virtual line's actual chunk count. I added a regression + guard + fix to clear the staleness thing altogether. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-14 09:44:22 +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#1577
No description provided.