preUpdateLinting hack isn't needed since CM 5.33
This commit is contained in:
		
							parent
							
								
									513845c289
								
							
						
					
					
						commit
						77d44c233e
					
				| 
						 | 
					@ -29,15 +29,9 @@
 | 
				
			||||||
      })),
 | 
					      })),
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  function invokeHelper(code, options, cm) {
 | 
					  function invokeHelper(code) {
 | 
				
			||||||
    const config = linterConfig.getCurrent();
 | 
					    const config = linterConfig.getCurrent();
 | 
				
			||||||
    return linterConfig.invokeWorker({code, config})
 | 
					    return linterConfig.invokeWorker({code, config})
 | 
				
			||||||
      .then(cookResults[linterConfig.getName()])
 | 
					      .then(cookResults[linterConfig.getName()]);
 | 
				
			||||||
      .then(results => {
 | 
					 | 
				
			||||||
        if (options && typeof options.preUpdateLinting === 'function') {
 | 
					 | 
				
			||||||
          options.preUpdateLinting(cm);
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        return results;
 | 
					 | 
				
			||||||
      });
 | 
					 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
})();
 | 
					})();
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -43,11 +43,7 @@ var linterConfig = {
 | 
				
			||||||
    return CodeMirror.lint && CodeMirror.lint[linter] ? {
 | 
					    return CodeMirror.lint && CodeMirror.lint[linter] ? {
 | 
				
			||||||
      getAnnotations: CodeMirror.lint[linter],
 | 
					      getAnnotations: CodeMirror.lint[linter],
 | 
				
			||||||
      delay: prefs.get('editor.lintDelay'),
 | 
					      delay: prefs.get('editor.lintDelay'),
 | 
				
			||||||
      preUpdateLinting(cm) {
 | 
					 | 
				
			||||||
        cm.startOperation();
 | 
					 | 
				
			||||||
      },
 | 
					 | 
				
			||||||
      onUpdateLinting(annotationsNotSorted, annotations, cm) {
 | 
					      onUpdateLinting(annotationsNotSorted, annotations, cm) {
 | 
				
			||||||
        cm.endOperation();
 | 
					 | 
				
			||||||
        updateLintReport(cm);
 | 
					        updateLintReport(cm);
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
    } : false;
 | 
					    } : false;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user