# feat: add WithoutCaps() for disabling specific terminal caps#1641
Open
mikeschinkel wants to merge 1 commit intocharmbracelet:mainfrom
Open
# feat: add WithoutCaps() for disabling specific terminal caps#1641mikeschinkel wants to merge 1 commit intocharmbracelet:mainfrom
mikeschinkel wants to merge 1 commit intocharmbracelet:mainfrom
Conversation
Add tea.WithoutCaps() ProgramOption to selectively disable ultraviolet terminal capabilities. This enables workarounds for terminal emulators that mishandle specific escape sequences without disabling all optimizations.
5a45687 to
9caee1b
Compare
This was referenced Mar 27, 2026
Contributor
|
Hi @mikeschinkel, I opened JetBrains/jediterm#331 to fix this upstream in JediTerm 🙂 |
Author
|
@aymanbagabas — Very cool, thank you. Now let’s see if JetBrains will prioritize evaluating it. 🤷♂️ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat: add WithoutCaps() program option for disabling specific terminal capabilities
Summary
WithoutCaps(...uv.Capability)program option so developers can selectively disable terminal capabilities that cause rendering issues on specific terminalsMotivation
Some terminal emulators report a standard
TERMvalue (e.g.xterm-256color) while not correctly implementing all the capabilities that implies. Currently there is no way for a Bubble Tea application to selectively disable specific rendering optimizations — the only workaround is overridingTERMto a less capable terminal type, which degrades the entire rendering pipeline (e.g. losing TrueColor).WithoutCaps()provides fine-grained control: disable only the problematic capability while keeping everything else at full quality.Example: JetBrains GoLand and all IntelliJ-based IDEs use JediTerm, which reports as
xterm-256colorbut mishandles CBT (Cursor Backward Tab), causing invalid rendering. A follow-up ultraviolet PR will add auto-detection for known problematic terminals; this PR provides the Bubble Tea-level API that lets developers handle cases not yet auto-detected.Usage
Changes
options.go— NewWithoutCaps(...uv.Capability)program option for manual capability control.options_test.go— Tests forWithoutCaps.cursed_renderer.go— NewsetDisabledCaps()method that stores and applies disabled caps. Also applied duringreset()so caps survive renderer recreation.tea.go— NewdisabledCaps []uv.Capabilityfield onProgram.Before merging
Once ultraviolet PR #100 is merged then you need to run
go get github.com/charmbracelet/ultraviolet@<commit>, followed bygo mod tidy.Test plan