Fix: autoCloseBrackets is true by default
This commit is contained in:
parent
f3a103645d
commit
c7f81662c4
|
@ -26,6 +26,8 @@
|
|||
<link href="vendor/codemirror/addon/dialog/dialog.css" rel="stylesheet">
|
||||
<script src="vendor/codemirror/addon/dialog/dialog.js"></script>
|
||||
|
||||
<script src="vendor/codemirror/addon/edit/closebrackets.js"></script>
|
||||
|
||||
<link href="vendor/codemirror/addon/search/matchesonscrollbar.css" rel="stylesheet">
|
||||
<script src="vendor/codemirror/addon/search/matchesonscrollbar.js"></script>
|
||||
<script src="vendor/codemirror/addon/scroll/annotatescrollbar.js"></script>
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
}
|
||||
|
||||
const defaults = {
|
||||
autoCloseBrackets: prefs.get('editor.autoCloseBrackets'),
|
||||
extraKeys: Object.assign(CodeMirror.defaults.extraKeys || {}, {
|
||||
// independent of current keyMap
|
||||
'Alt-Enter': 'toggleStyle',
|
||||
|
|
|
@ -58,11 +58,6 @@ const cmFactory = (() => {
|
|||
if (option === 'colorpicker') {
|
||||
return;
|
||||
}
|
||||
// FIXME: is this an overhead?
|
||||
if (option === 'autoCloseBrackets' && value) {
|
||||
return loadScript('/vendor/codemirror/addon/edit/closebrackets.js')
|
||||
.then(() => setOption(option, value));
|
||||
}
|
||||
if (option === 'theme') {
|
||||
const themeLink = $('#cm-theme');
|
||||
// use non-localized 'default' internally
|
||||
|
|
Loading…
Reference in New Issue
Block a user