aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRubén Rincón Blanco <ruben@rinconblanco.es>2022-11-02 14:55:43 +0100
committerGitHub <noreply@github.com>2022-11-02 14:55:43 +0100
commitaa816778d6e91e04d99307ac0650b4e3262ad006 (patch)
treee9eb8b8af5dee9f9256365f1a7ffa7b2723ca805
parenta4d08986e84a859d21d4aabd612150d1464eb798 (diff)
downloadcompiler-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.ts6
-rw-r--r--views/index.pug2
-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