fix: disable high-performance pager rendering by default - #997
Open
SomSamantray wants to merge 2 commits into
Open
fix: disable high-performance pager rendering by default#997SomSamantray wants to merge 2 commits into
SomSamantray wants to merge 2 commits into
Conversation
HighPerformancePager defaulted to true, wiring bubbles' viewport.HighPerformanceRendering on by default. That mode is deprecated upstream in Bubble Tea and bypasses the normal renderer with raw ANSI scroll-region escapes, which several terminals (e.g. kitty) don't render correctly, causing shuffled/duplicated lines during scroll. Default it off; GLOW_HIGH_PERFORMANCE_PAGER=true still opts back in. Fixes charmbracelet#554
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.
Summary
HighPerformancePagerdefaulted totrue, wiring bubbles'viewport.HighPerformanceRenderingon by default. That mode bypasses bubbletea's normal renderer with raw ANSI scroll-region escapes and is now marked deprecated upstream (bubbles/viewport: "high performance rendering is now deprecated in Bubble Tea"). Several terminals (e.g. kitty, per the report) don't render the scroll-region escapes correctly, which produces the shuffled/duplicated lines described in #554 after scrolling withu/dor the mouse wheel.This defaults the pager to the standard renderer.
GLOW_HIGH_PERFORMANCE_PAGER=truestill opts back in for anyone who wants it.Changes
ui/config.go: flipHighPerformancePager'senvDefaultfrom"true"to"false".ui/config_test.go(new): covers default / explicit-off / explicit-on for the env var.ui/pager_test.go(new): covers thatnewPagerModelwiresconfig.HighPerformancePagerintoviewport.HighPerformanceRenderingcorrectly in both directions.No behavioral logic changes to
pager.go/ui.go— those already branch correctly onHighPerformanceRendering; this is a config-default fix plus the test coverage that path was missing.Test plan
go test ./ui/...— all pass, including the new tests.go build ./...and fullgo test ./...— pass, no regressions.Fixes #554