Skip to content

fix: disable high-performance pager rendering by default - #997

Open
SomSamantray wants to merge 2 commits into
charmbracelet:masterfrom
SomSamantray:fix/disable-high-performance-pager-default
Open

fix: disable high-performance pager rendering by default#997
SomSamantray wants to merge 2 commits into
charmbracelet:masterfrom
SomSamantray:fix/disable-high-performance-pager-default

Conversation

@SomSamantray

Copy link
Copy Markdown

Summary

HighPerformancePager defaulted to true, wiring bubbles' viewport.HighPerformanceRendering on 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 with u/d or the mouse wheel.

This defaults the pager to the standard renderer. GLOW_HIGH_PERFORMANCE_PAGER=true still opts back in for anyone who wants it.

Changes

  • ui/config.go: flip HighPerformancePager's envDefault from "true" to "false".
  • ui/config_test.go (new): covers default / explicit-off / explicit-on for the env var.
  • ui/pager_test.go (new): covers that newPagerModel wires config.HighPerformancePager into viewport.HighPerformanceRendering correctly in both directions.

No behavioral logic changes to pager.go/ui.go — those already branch correctly on HighPerformanceRendering; 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 full go test ./... — pass, no regressions.

Fixes #554

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
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.

glow shuffles lines randomly after scrolling using u/d buttons or mouse

1 participant