"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "addon/lint/lint.js" between
CodeMirror-5.62.1.tar.gz and CodeMirror-5.62.2.tar.gz

About: CodeMirror is a text editor implemented in JavaScript for the browser and specialized for editing code.

lint.js  (CodeMirror-5.62.1):lint.js  (CodeMirror-5.62.2)
skipping to change at line 86 skipping to change at line 86
this.timeout = null; this.timeout = null;
this.hasGutter = hasGutter; this.hasGutter = hasGutter;
this.onMouseOver = function(e) { onMouseOver(cm, e); }; this.onMouseOver = function(e) { onMouseOver(cm, e); };
this.waitingFor = 0 this.waitingFor = 0
} }
var defaults = { var defaults = {
highlightLines: false, highlightLines: false,
tooltips: true, tooltips: true,
delay: 500, delay: 500,
lintOnChange: true lintOnChange: true,
getAnnotations: null,
async: false,
selfContain: null,
formatAnnotation: null,
onUpdateLinting: null
} }
function clearMarks(cm) { function clearMarks(cm) {
var state = cm.state.lint; var state = cm.state.lint;
if (state.hasGutter) cm.clearGutter(GUTTER_ID); if (state.hasGutter) cm.clearGutter(GUTTER_ID);
if (state.options.highlightLines) clearErrorLines(cm); if (state.options.highlightLines) clearErrorLines(cm);
for (var i = 0; i < state.marked.length; ++i) for (var i = 0; i < state.marked.length; ++i)
state.marked[i].clear(); state.marked[i].clear();
state.marked.length = 0; state.marked.length = 0;
} }
skipping to change at line 221 skipping to change at line 226
if (state.hasGutter) tipLabel.appendChild(annotationTooltip(ann)); if (state.hasGutter) tipLabel.appendChild(annotationTooltip(ann));
if (ann.to) state.marked.push(cm.markText(ann.from, ann.to, { if (ann.to) state.marked.push(cm.markText(ann.from, ann.to, {
className: "CodeMirror-lint-mark CodeMirror-lint-mark-" + severity, className: "CodeMirror-lint-mark CodeMirror-lint-mark-" + severity,
__annotation: ann __annotation: ann
})); }));
} }
// use original annotations[line] to show multiple messages // use original annotations[line] to show multiple messages
if (state.hasGutter) if (state.hasGutter)
cm.setGutterMarker(line, GUTTER_ID, makeMarker(cm, tipLabel, maxSeverity , annotations[line].length > 1, cm.setGutterMarker(line, GUTTER_ID, makeMarker(cm, tipLabel, maxSeverity , annotations[line].length > 1,
state.options.tooltips)); options.tooltips));
if (state.options.highlightLines) if (options.highlightLines)
cm.addLineClass(line, "wrap", LINT_LINE_ID + maxSeverity); cm.addLineClass(line, "wrap", LINT_LINE_ID + maxSeverity);
} }
if (options.onUpdateLinting) options.onUpdateLinting(annotationsNotSorted, a nnotations, cm); if (options.onUpdateLinting) options.onUpdateLinting(annotationsNotSorted, a nnotations, cm);
} }
function onChange(cm) { function onChange(cm) {
var state = cm.state.lint; var state = cm.state.lint;
if (!state) return; if (!state) return;
clearTimeout(state.timeout); clearTimeout(state.timeout);
state.timeout = setTimeout(function(){startLinting(cm);}, state.options.dela y); state.timeout = setTimeout(function(){startLinting(cm);}, state.options.dela y);
 End of changes. 3 change blocks. 
3 lines changed or deleted 8 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)