mirror of
https://github.com/anomalyco/opentui.git
synced 2026-04-24 20:45:56 +03:00
[PR #617] [MERGED] feat(DiffRenderable): expose line highlighting API #662
Labels
No labels
bug
core
documentation
feature
good first issue
help wanted
pull-request
question
react
solid
tmux
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/opentui#662
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/anomalyco/opentui/pull/617
Author: @3000-2
Created: 2/2/2026
Status: ✅ Merged
Merged: 2/17/2026
Merged by: @kommander
Base:
main← Head:feat/diff-line-highlight-api📝 Commits (8)
28b43fcfeat(DiffRenderable): expose line highlighting APIf2a8a92test(DiffRenderable): add tests for line highlighting API3040a6cperf(LineNumberRenderable): batch line color updates to reduce re-renders26e24b3Merge branch 'main' into feat/diff-line-highlight-api3a8527aMerge branch 'main' into feat/diff-line-highlight-api93421c8Merge branch 'main' into feat/diff-line-highlight-api79bd869Merge branch 'main' into feat/diff-line-highlight-api9a51527Merge branch 'main' into feat/diff-line-highlight-api📊 Changes
4 files changed (+199 additions, -0 deletions)
View changed files
📝
packages/core/src/renderables/Diff.test.ts(+73 -0)📝
packages/core/src/renderables/Diff.ts(+30 -0)📝
packages/core/src/renderables/LineNumberRenderable.ts(+19 -0)📝
packages/core/src/renderables/__tests__/LineNumberRenderable.test.ts(+77 -0)📄 Description
Summary
Add public methods to
DiffRenderablefor controlling line colors from external code:Motivation
These methods enable use cases like highlighting the "current hunk" in a diff viewer application. The internal
LineNumberRenderablealready supports line coloring - this PR simply exposes that capability through the publicDiffRenderableAPI.Example Usage
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.