[PR #810] feat(extmarks): add clickable handlers for text buffers #1580

Open
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/810
Author: @tobwen
Created: 3/12/2026
Status: 🔄 Open

Base: mainHead: feature/clickable-extmarks


📝 Commits (1)

  • 5ca5ffb feat(extmarks): add clickable handlers for text buffers

📊 Changes

4 files changed (+142 additions, -2 deletions)

View changed files

📝 packages/core/src/lib/extmarks.test.ts (+18 -0)
📝 packages/core/src/lib/extmarks.ts (+71 -0)
📝 packages/core/src/renderables/EditBufferRenderable.ts (+25 -2)
📝 packages/core/src/renderables/__tests__/Textarea.selection.test.ts (+28 -0)

📄 Description

Summary

Adds a new clickable text-extmark feature for text buffers. Closes #809

This enables downstream interactions such as expand/edit/collapse summaries, preserves click targeting from mousedown, ignores drag-selection for click dispatch, and keeps typeId indexing correct during updates.

Verification

  • added targeted tests for typeId update handling and the drag-selection click regression
  • bun run build:lib passes
  • bun test src/lib/extmarks.test.ts src/renderables/__tests__/Textarea.selection.test.ts segfaults on local Bun 1.3.10

🔄 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/810 **Author:** [@tobwen](https://github.com/tobwen) **Created:** 3/12/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `feature/clickable-extmarks` --- ### 📝 Commits (1) - [`5ca5ffb`](https://github.com/anomalyco/opentui/commit/5ca5ffb8d61b24ed1980a164a05974c4b4eec420) feat(extmarks): add clickable handlers for text buffers ### 📊 Changes **4 files changed** (+142 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `packages/core/src/lib/extmarks.test.ts` (+18 -0) 📝 `packages/core/src/lib/extmarks.ts` (+71 -0) 📝 `packages/core/src/renderables/EditBufferRenderable.ts` (+25 -2) 📝 `packages/core/src/renderables/__tests__/Textarea.selection.test.ts` (+28 -0) </details> ### 📄 Description ## Summary Adds a new clickable text-extmark feature for text buffers. Closes #809 This enables downstream interactions such as expand/edit/collapse summaries, preserves click targeting from `mousedown`, ignores drag-selection for click dispatch, and keeps `typeId` indexing correct during updates. ## Verification - added targeted tests for `typeId` update handling and the drag-selection click regression - `bun run build:lib` passes - `bun test src/lib/extmarks.test.ts src/renderables/__tests__/Textarea.selection.test.ts` segfaults on local Bun `1.3.10` --- <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#1580
No description provided.