diff options
author | Rubén Rincón Blanco <ruben@rinconblanco.es> | 2022-11-02 14:55:43 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-02 14:55:43 +0100 |
commit | aa816778d6e91e04d99307ac0650b4e3262ad006 (patch) | |
tree | e9eb8b8af5dee9f9256365f1a7ffa7b2723ca805 | |
parent | a4d08986e84a859d21d4aabd612150d1464eb798 (diff) | |
download | compiler-explorer-gh-4722.tar.gz compiler-explorer-gh-4722.zip |
Fixes some issues with editor setting values (#4228)gh-4722
-rw-r--r-- | static/panes/editor.ts | 6 | ||||
-rw-r--r-- | views/index.pug | 2 | ||||
-rw-r--r-- | views/popups/_all.pug (renamed from views/popups/popups.pug) | 0 |
3 files changed, 4 insertions, 4 deletions
diff --git a/static/panes/editor.ts b/static/panes/editor.ts index 084563132..6ae3f487c 100644 --- a/static/panes/editor.ts +++ b/static/panes/editor.ts @@ -1207,12 +1207,12 @@ export class Editor extends MonacoPane<monaco.editor.IStandaloneCodeEditor, Edit override onSettingsChange(newSettings: SiteSettings | Record<string, never>): void { const before = this.settings; const after = newSettings; - this.settings = _.clone(newSettings); + this.settings = {...newSettings}; this.editor.updateOptions({ autoIndent: this.settings.autoIndent ? 'advanced' : 'none', - // @ts-expect-error: boolean is not assignable to editor.EditorAutoClosingStrategy - autoClosingBrackets: this.settings.autoCloseBrackets, + autoClosingBrackets: this.settings.autoCloseBrackets ? 'always' : 'never', + // @ts-ignore useVim is added by the vim plugin, not present in base editor options useVim: this.settings.useVim, quickSuggestions: this.settings.showQuickSuggestions, contextmenu: this.settings.useCustomContextMenu, diff --git a/views/index.pug b/views/index.pug index 755c781c0..775e13aba 100644 --- a/views/index.pug +++ b/views/index.pug @@ -100,4 +100,4 @@ block prepend content include menu-other.pug block append footer - include popups/popups + include popups/_all diff --git a/views/popups/popups.pug b/views/popups/_all.pug index 5fa750e2f..5fa750e2f 100644 --- a/views/popups/popups.pug +++ b/views/popups/_all.pug |