From 407e70b20cd8c0cd3a343d334b7f98129d5ab6c9 Mon Sep 17 00:00:00 2001 From: narcolepticinsomniac Date: Fri, 12 Oct 2018 17:25:46 -0400 Subject: [PATCH] Reincorporate 8's updates --- edit/codemirror-editing-hooks.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/edit/codemirror-editing-hooks.js b/edit/codemirror-editing-hooks.js index 308f99e7..b90ac995 100644 --- a/edit/codemirror-editing-hooks.js +++ b/edit/codemirror-editing-hooks.js @@ -1,5 +1,5 @@ /* -global CodeMirror linterConfig loadScript +global CodeMirror loadScript global editors editor styleId ownTabId global save toggleStyle setupAutocomplete makeSectionVisible getSectionForChild global getSectionsHashes @@ -8,9 +8,6 @@ global messageBox 'use strict'; onDOMscriptReady('/codemirror.js').then(() => { - - CodeMirror.defaults.lint = linterConfig.getForCodeMirror(); - const COMMANDS = { save, toggleStyle, @@ -43,6 +40,9 @@ onDOMscriptReady('/codemirror.js').then(() => { }); CodeMirror.defineInitHook(cm => { + if (!cm.display.wrapper.closest('#sections')) { + return; + } if (prefs.get('editor.livePreview') && styleId) { cm.on('changes', updatePreview); }