MCPcopy Index your code
hub / github.com/csev/py4e / changeLine

Function changeLine

tools/pythonauto/static/codemirrorepl/codemirror.js:3659–3667  ·  view source on GitHub ↗
(cm, handle, changeType, op)

Source from the content-addressed store, hash-verified

3657 // returning the number and optionally registering the line as
3658 // changed.
3659 function changeLine(cm, handle, changeType, op) {
3660 var no = handle, line = handle, doc = cm.doc;
3661 if (typeof handle == "number") line = getLine(doc, clipLine(doc, handle));
3662 else no = lineNo(handle);
3663 if (no == null) return null;
3664 if (op(line, no)) regLineChange(cm, no, changeType);
3665 else return null;
3666 return line;
3667 }
3668
3669 // Helper for deleting text near the selection(s), used to implement
3670 // backspace, delete, and similar functionality.

Callers 2

codemirror.jsFile · 0.70
addLineWidgetFunction · 0.70

Calls 4

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

Tested by

no test coverage detected