MCPcopy Create free account
hub / github.com/breck7/scroll / regLineChange

Function regLineChange

external/.scrollLibs.js:5657–5676  ·  view source on GitHub ↗
(cm, line, type)

Source from the content-addressed store, hash-verified

5655 // Register a change to a single line. Type must be one of "text",
5656 // "gutter", "class", "widget"
5657 function regLineChange(cm, line, type) {
5658 cm.curOp.viewChanged = true
5659 var display = cm.display,
5660 ext = cm.display.externalMeasured
5661 if (ext && line >= ext.lineN && line < ext.lineN + ext.size) {
5662 display.externalMeasured = null
5663 }
5664
5665 if (line < display.viewFrom || line >= display.viewTo) {
5666 return
5667 }
5668 var lineView = display.view[findViewIndex(cm, line)]
5669 if (lineView.node == null) {
5670 return
5671 }
5672 var arr = lineView.changes || (lineView.changes = [])
5673 if (indexOf(arr, type) == -1) {
5674 arr.push(type)
5675 }
5676 }
5677
5678 // Clear the view.
5679 function resetView(cm) {

Callers 7

highlightWorkerFunction · 0.85
shiftDocFunction · 0.85
changeLineFunction · 0.85
.scrollLibs.jsFile · 0.85
markTextFunction · 0.85
addEditorMethodsFunction · 0.85

Calls 2

findViewIndexFunction · 0.85
indexOfFunction · 0.85

Tested by

no test coverage detected