MCPcopy
hub / github.com/witheve/Eve / changeLine

Function changeLine

src/codemirror.js:4796–4803  ·  view source on GitHub ↗
(doc, handle, changeType, op)

Source from the content-addressed store, hash-verified

4794 // returning the number and optionally registering the line as
4795 // changed.
4796 function changeLine(doc, handle, changeType, op) {
4797 var no = handle, line = handle;
4798 if (typeof handle == "number") line = getLine(doc, clipLine(doc, handle));
4799 else no = lineNo(handle);
4800 if (no == null) return null;
4801 if (op(line, no) && doc.cm) regLineChange(doc.cm, no, changeType);
4802 return line;
4803 }
4804
4805 // Helper for deleting text near the selection(s), used to implement
4806 // backspace, delete, and similar functionality.

Callers 2

codemirror.jsFile · 0.85
addLineWidgetFunction · 0.85

Calls 4

getLineFunction · 0.85
clipLineFunction · 0.85
lineNoFunction · 0.85
regLineChangeFunction · 0.85

Tested by

no test coverage detected