From 77d44c233eea2f7f94634a97def6aae8c9c88c89 Mon Sep 17 00:00:00 2001 From: tophf Date: Sat, 3 Mar 2018 23:11:15 +0300 Subject: [PATCH] preUpdateLinting hack isn't needed since CM 5.33 --- edit/lint-codemirror-helper.js | 10 ++-------- edit/lint.js | 4 ---- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/edit/lint-codemirror-helper.js b/edit/lint-codemirror-helper.js index d1c12f45..7b43a0d3 100644 --- a/edit/lint-codemirror-helper.js +++ b/edit/lint-codemirror-helper.js @@ -29,15 +29,9 @@ })), }; - function invokeHelper(code, options, cm) { + function invokeHelper(code) { const config = linterConfig.getCurrent(); return linterConfig.invokeWorker({code, config}) - .then(cookResults[linterConfig.getName()]) - .then(results => { - if (options && typeof options.preUpdateLinting === 'function') { - options.preUpdateLinting(cm); - } - return results; - }); + .then(cookResults[linterConfig.getName()]); } })(); diff --git a/edit/lint.js b/edit/lint.js index ff44300c..2e671b1e 100644 --- a/edit/lint.js +++ b/edit/lint.js @@ -43,11 +43,7 @@ var linterConfig = { return CodeMirror.lint && CodeMirror.lint[linter] ? { getAnnotations: CodeMirror.lint[linter], delay: prefs.get('editor.lintDelay'), - preUpdateLinting(cm) { - cm.startOperation(); - }, onUpdateLinting(annotationsNotSorted, annotations, cm) { - cm.endOperation(); updateLintReport(cm); }, } : false;