Make it possible to set languages defined by an extension as default …#11257
Make it possible to set languages defined by an extension as default …#11257marcelgerber wants to merge 4 commits intomasterfrom
Conversation
|
Should we consider the case of a language being defined after the extensions are loaded? Might happen if an extension defines a language after some sort of action and not at startup, or maybe you could have installed a language, set it as default, then deleted that extension, restarted brackets, waited a bit and reinstalled the same language extension. |
|
I've thought about that too, but I didn't consider the case of installing a new extension. |
|
I was thinking to call the update code if the preference manager is defined every time a new language is defined. |
|
@TomMalbran Did that as well. |
|
Superseded by #12979. |
…for a file extension
Filtering out languages which are not currently defined (because they are probably defined by an extension later on) fixes the case described in #11252.
[Already done]
Currently, it seems to be working miraculously as the pref change handler fires late enough, but I think I should add an additionalAppInit.extensionsLoadedcallback just to be safe. (Does anyone know why the change handler is called so late? I don't think that's the intended behavior...)