@@ -3091,10 +3091,12 @@ func (m *UI) cacheSidebarLogo(width int) {
3091 m.sidebarLogo = renderLogo(m.com.Styles, true, m.com.IsHyper(), width)
3091 m.sidebarLogo = renderLogo(m.com.Styles, true, m.com.IsHyper(), width)
3094−// applyTheme replaces the active styles with the given theme and
3094+// applyTheme replaces the active styles with the given theme, drops the
3095−// refreshes every component that caches style data.
3095+// shared markdown renderer cache, and refreshes every component that
3096+// caches style data.
3096func (m *UI) applyTheme(s styles.Styles) {
3097func (m *UI) applyTheme(s styles.Styles) {
3097 *m.com.Styles = s
3098 *m.com.Styles = s
3099+ common.InvalidateMarkdownRendererCache()
3098 m.refreshStyles()
3100 m.refreshStyles()
@@ -3116,7 +3118,6 @@ func (m *UI) refreshStyles() {
3117 m.todoSpinner.Style = t.Pills.TodoSpinner
3119 m.todoSpinner.Style = t.Pills.TodoSpinner
3118 m.status.help.Styles = t.Help
3120 m.status.help.Styles = t.Help
3119− common.InvalidateMarkdownRendererCache()
3120 m.chat.InvalidateRenderCaches()
3121 m.chat.InvalidateRenderCaches()