MCPcopy
hub / github.com/nwutils/nw-sample-apps / changeLine

Function changeLine

mini-code-edit/cm/lib/codemirror.js:1482–1490  ·  view source on GitHub ↗
(handle, op)

Source from the content-addressed store, hash-verified

1480 }
1481
1482 function changeLine(handle, op) {
1483 var no = handle, line = handle;
1484 if (typeof handle == "number") line = getLine(clipLine(handle));
1485 else no = lineNo(handle);
1486 if (no == null) return null;
1487 if (op(line, no)) changes.push({from: no, to: no + 1});
1488 else return null;
1489 return line;
1490 }
1491 function setLineClass(handle, className, bgClassName) {
1492 return changeLine(handle, function(line) {
1493 if (line.className != className || line.bgClassName != bgClassName) {

Callers 2

setLineClassFunction · 0.85
setLineHiddenFunction · 0.85

Calls 3

getLineFunction · 0.85
lineNoFunction · 0.85
clipLineFunction · 0.70

Tested by

no test coverage detected