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

Function updateLineForChanges

external/.scrollLibs.js:3300–3314  ·  view source on GitHub ↗
(cm, lineView, lineN, dims)

Source from the content-addressed store, hash-verified

3298 // lineView.changes. This updates the relevant part of the line's
3299 // DOM structure.
3300 function updateLineForChanges(cm, lineView, lineN, dims) {
3301 for (var j = 0; j < lineView.changes.length; j++) {
3302 var type = lineView.changes[j]
3303 if (type == "text") {
3304 updateLineText(cm, lineView)
3305 } else if (type == "gutter") {
3306 updateLineGutter(cm, lineView, lineN, dims)
3307 } else if (type == "class") {
3308 updateLineClasses(cm, lineView)
3309 } else if (type == "widget") {
3310 updateLineWidgets(cm, lineView, dims)
3311 }
3312 }
3313 lineView.changes = null
3314 }
3315
3316 // Lines with gutter elements, widgets or a background class need to
3317 // be wrapped, and have the extra elements added to the wrapper div

Callers 2

prepareMeasureForLineFunction · 0.85
patchDisplayFunction · 0.85

Calls 4

updateLineTextFunction · 0.85
updateLineGutterFunction · 0.85
updateLineClassesFunction · 0.85
updateLineWidgetsFunction · 0.85

Tested by

no test coverage detected