[PR #658] fix(text-buffer): recalculate rope segment widths on tab width change #693

Open
opened 2026-03-02 23:47:42 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/anomalyco/opentui/pull/658
Author: @simonklee
Created: 2/9/2026
Status: 🔄 Open

Base: mainHead: set-tab-width-rebuild


📝 Commits (3)

  • 5599ef5 fix(text-buffer): recalculate rope segment widths on tab width change
  • e459992 fix compile errors
  • 81ce877 Merge branch 'main' into set-tab-width-rebuild

📊 Changes

2 files changed (+74 additions, -0 deletions)

View changed files

📝 packages/core/src/zig/tests/text-buffer_test.zig (+20 -0)
📝 packages/core/src/zig/text-buffer.zig (+54 -0)

📄 Description

When tab width changes, rebuild rope segments with recomputed chunk widths before updating tab_width so line metrics and total width stay consistent.


🔄 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/658 **Author:** [@simonklee](https://github.com/simonklee) **Created:** 2/9/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `set-tab-width-rebuild` --- ### 📝 Commits (3) - [`5599ef5`](https://github.com/anomalyco/opentui/commit/5599ef5317b8f4a1bc5c8d32e0cd689e6383a6b6) fix(text-buffer): recalculate rope segment widths on tab width change - [`e459992`](https://github.com/anomalyco/opentui/commit/e45999211f29d4191f4caa313ba821bb2771aa02) fix compile errors - [`81ce877`](https://github.com/anomalyco/opentui/commit/81ce877dd5b48b06c88a79f0e5592eb8c31bce1c) Merge branch 'main' into set-tab-width-rebuild ### 📊 Changes **2 files changed** (+74 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `packages/core/src/zig/tests/text-buffer_test.zig` (+20 -0) 📝 `packages/core/src/zig/text-buffer.zig` (+54 -0) </details> ### 📄 Description When tab width changes, rebuild rope segments with recomputed chunk widths before updating tab_width so line metrics and total width stay consistent. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
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#693
No description provided.