MCPcopy Create free account
hub / github.com/TextGeneratorio/text-generator.io / changeLine

Function changeLine

static/libs/codemirror.js:5473–5480  ·  view source on GitHub ↗
(doc, handle, changeType, op)

Source from the content-addressed store, hash-verified

5471// returning the number and optionally registering the line as
5472// changed.
5473function changeLine(doc, handle, changeType, op) {
5474 var no = handle, line = handle;
5475 if (typeof handle == "number") { line = getLine(doc, clipLine(doc, handle)); }
5476 else { no = lineNo(handle); }
5477 if (no == null) { return null }
5478 if (op(line, no) && doc.cm) { regLineChange(doc.cm, no, changeType); }
5479 return line
5480}
5481
5482// The document is represented as a BTree consisting of leaves, with
5483// chunk of lines in them, and branches, with up to ten leaves or

Callers 2

addLineWidgetFunction · 0.85
codemirror.jsFile · 0.85

Calls 4

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

Tested by

no test coverage detected