MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / changeLine

Function changeLine

lib/web/CodeMirror/src/model/changes.js:332–339  ·  view source on GitHub ↗
(doc, handle, changeType, op)

Source from the content-addressed store, hash-verified

330// returning the number and optionally registering the line as
331// changed.
332export function changeLine(doc, handle, changeType, op) {
333 let no = handle, line = handle
334 if (typeof handle == "number") line = getLine(doc, clipLine(doc, handle))
335 else no = lineNo(handle)
336 if (no == null) return null
337 if (op(line, no) && doc.cm) regLineChange(doc.cm, no, changeType)
338 return line
339}

Callers 2

Doc.jsFile · 0.90
addLineWidgetFunction · 0.90

Calls 4

getLineFunction · 0.90
clipLineFunction · 0.90
lineNoFunction · 0.90
regLineChangeFunction · 0.90

Tested by

no test coverage detected