Skip to content

setter issue of options.theme #4124

@jerch

Description

@jerch

Took me some time to find out, why this doesnt work in the console:

t = term.options.theme
t.background = '#000000'
term.options.theme = t  // no change at all
t2 = {...t}
term.options.theme = t2  // works

Its kinda the old mutual vs immutable issue, and I wonder if we should fix it. Possible ways to deal with it:

  • some doc notes stating that the theme object has to change identity to take effect
  • or do the {...theme} always in the setter (thus forcing the terminal to re-eval the object), imho most straight forward solution, as this is a rare action not hurting performance

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/apitype/documentationRegarding website, API documentation, README, etc.type/enhancementFeatures or improvements to existing features

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions