MCPcopy Create free account
hub / github.com/TruthHun/BookStack / changeLine

Function changeLine

static/editor.md/lib/codemirror/lib/codemirror.js:4593–4600  ·  view source on GitHub ↗
(doc, handle, changeType, op)

Source from the content-addressed store, hash-verified

4591 // returning the number and optionally registering the line as
4592 // changed.
4593 function changeLine(doc, handle, changeType, op) {
4594 var no = handle, line = handle;
4595 if (typeof handle == "number") line = getLine(doc, clipLine(doc, handle));
4596 else no = lineNo(handle);
4597 if (no == null) return null;
4598 if (op(line, no) && doc.cm) regLineChange(doc.cm, no, changeType);
4599 return line;
4600 }
4601
4602 // Helper for deleting text near the selection(s), used to implement
4603 // backspace, delete, and similar functionality.

Callers 2

codemirror.jsFile · 0.70
addLineWidgetFunction · 0.70

Calls 4

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

Tested by

no test coverage detected