@@ -3091,10 +3091,12 @@ func (m *UI) cacheSidebarLogo(width int) {
30913091 m.sidebarLogo = renderLogo(m.com.Styles, true, m.com.IsHyper(), width)
30923092}
30933093
3094−// applyTheme replaces the active styles with the given theme and
3095−// refreshes every component that caches style data.
3094+// applyTheme replaces the active styles with the given theme, drops the
3095+// shared markdown renderer cache, and refreshes every component that
3096+// caches style data.
30963097func (m *UI) applyTheme(s styles.Styles) {
30973098 *m.com.Styles = s
3099+ common.InvalidateMarkdownRendererCache()
30983100 m.refreshStyles()
30993101}
31003102
@@ -3116,7 +3118,6 @@ func (m *UI) refreshStyles() {
31163118 )
31173119 m.todoSpinner.Style = t.Pills.TodoSpinner
31183120 m.status.help.Styles = t.Help
3119− common.InvalidateMarkdownRendererCache()
31203121 m.chat.InvalidateRenderCaches()
31213122}
31223123