Skip to content

fix: live theme/font config reload + pane selection fix#1640

Open
flukejones wants to merge 5 commits into
raphamorim:mainfrom
flukejones:main
Open

fix: live theme/font config reload + pane selection fix#1640
flukejones wants to merge 5 commits into
raphamorim:mainfrom
flukejones:main

Conversation

@flukejones

@flukejones flukejones commented Jun 2, 2026

Copy link
Copy Markdown

What

  • theme: notify apps of color-scheme change via DECSET 2031 (helix, neovim repaint live)
  • theme: clear per-pane OSC colors on alt-screen exit
  • theme: repaint all panes on theme change (idle panes were stuck)
  • font: update metrics + glyphs on font switch (stale font_id caches)
  • mouse: clear stale selection on pane focus-switch click

Closes

Test

  • cargo check -p rioterm (metal + cpu): clean
  • cargo check -p sugarloaf --features wgpu: clean
  • Vulkan path is #[cfg(target_os = "linux")]; mirrors the metal/wgpu pattern,
    not natively checked on macOS
  • Both fixes confirmed working at runtime on macOS

- focus-switch click skipped on_left_click, kept old anchor
- in-flight LMB drag-extended it across pane
- clear selection, reset click_state, return on switch

Closes raphamorim#1638
font_id-keyed caches survived a font-library swap (ids reused), so
line height, spacing, glyph bitmaps stayed stale.

- add GridGlyphRasterizer::reset_font_caches
- add clear_glyph_cache per grid backend + clear() on vulkan/cpu atlases
- call both per panel in update_config on font-library update

Closes raphamorim#1639
- update_config reset renderable_content but left panes not-dirty
- resize_all_contexts repaints only via PTY wakeup; idle panes never get it
- mark per-pane Full damage after the reset
OSC 4/10/11 overrides outlived the app that set them, reverting a pane
to the old theme on editor reopen.

- clear pane OSC overrides on alt-screen exit
- running apps keep overrides across theme change
- push only bg reset to frontend
Apps had to restart to pick up a theme change. Implement DECSET 2031
so subscribed apps (helix, neovim) re-query colors and repaint live.

- DECSET 2031 opts in to notifications
- push unsolicited CSI ? 997 ; <1 dark|2 light> n on theme change
- answer CSI ? 996 n query with stored scheme
- scheme from OS appearance / [adaptive-theme], threaded via update_config
@flukejones flukejones changed the title fix: stale pane selection on focus-switch + stale metrics/glyphs on font switch fix: live theme/font config reload + pane selection fix Jun 29, 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.

1 participant