aboutsummaryrefslogtreecommitdiffstats
path: root/web_src/js
diff options
context:
space:
mode:
Diffstat (limited to 'web_src/js')
-rw-r--r--web_src/js/features/codeeditor.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/web_src/js/features/codeeditor.js b/web_src/js/features/codeeditor.js
index 4fb8bb9e63..f5e4e74dc6 100644
--- a/web_src/js/features/codeeditor.js
+++ b/web_src/js/features/codeeditor.js
@@ -112,6 +112,10 @@ export async function createMonaco(textarea, filename, editorOpts) {
...other,
});
+ monaco.editor.addKeybindingRules([
+ {keybinding: monaco.KeyCode.Enter, command: null}, // disable enter from accepting code completion
+ ]);
+
const model = editor.getModel();
model.onDidChangeContent(() => {
textarea.value = editor.getValue({preserveBOM: true});