Skip to content

feat(backend): make "underline-color" feature optional#166

Merged
orhun merged 6 commits intoratatui:mainfrom
junkdog:optional-underline-color
Feb 14, 2026
Merged

feat(backend): make "underline-color" feature optional#166
orhun merged 6 commits intoratatui:mainfrom
junkdog:optional-underline-color

Conversation

@junkdog
Copy link
Copy Markdown
Member

@junkdog junkdog commented Feb 14, 2026

this PR makes the underline-color feature optional. when disabled, 8 bytes are recouped per terminal cell (4 bytes per cell in ratatui's two Vec<Cell> terminal buffers). this also helps somewhat with the limited bandwidth on targeted hardware.

currently, underline-color is enabled by default since i didn't want to start off with a breaking change, but i propose to make it opt-in instead, as it's only a breaking change if you're already using the feature, plus the memory savings from not enabling it warrants the opt-in setup (as this could otherwise go unnoticed).

Copy link
Copy Markdown
Member

@orhun orhun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's make it opt-in, that's also what we are doing in ratatui-core

I believe users could enable this if they need it. The performance benefit is more important here than shipping this with many features imo

Co-authored-by: Orhun Parmaksız <[email protected]>
Copy link
Copy Markdown
Member

@orhun orhun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@orhun
Copy link
Copy Markdown
Member

orhun commented Feb 14, 2026

Can you also update BREAKING-CHANGES.md about this? We should probably mention the 4-byte performance optimization there as a reason.

@orhun orhun merged commit 8b521de into ratatui:main Feb 14, 2026
27 checks passed
@github-actions github-actions bot mentioned this pull request Feb 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants