Skip to content

Commit

Permalink
Merge pull request #7611 from ajbozarth/editor-configs
Browse files Browse the repository at this point in the history
Support transient editor configs
  • Loading branch information
Steven Silvester committed Dec 11, 2019
2 parents ea87dd7 + 8613bcc commit 3ba40d8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/fileeditor-extension/src/commands.ts
Expand Up @@ -147,11 +147,15 @@ export namespace Commands {

/**
* Update the settings of a widget.
* Skip global settings for transient editor specific configs.
*/
export function updateWidget(widget: FileEditor): void {
const transientConfigs = ['lineNumbers', 'lineWrap', 'matchBrackets'];
const editor = widget.editor;
Object.keys(config).forEach((key: keyof CodeEditor.IConfig) => {
editor.setOption(key, config[key]);
if (!transientConfigs.includes(key)) {
editor.setOption(key, config[key]);
}
});
}

Expand Down

0 comments on commit 3ba40d8

Please sign in to comment.