MCPcopy Create free account
hub / github.com/ronreiter/interactive-tutorials / updateDisplay

Function updateDisplay

static/js/codemirror/codemirror.js:396–408  ·  view source on GitHub ↗
(cm, changes, viewPort)

Source from the content-addressed store, hash-verified

394 // DISPLAY DRAWING
395
396 function updateDisplay(cm, changes, viewPort) {
397 var oldFrom = cm.display.showingFrom, oldTo = cm.display.showingTo;
398 var updated = updateDisplayInner(cm, changes, viewPort);
399 if (updated) {
400 signalLater(cm, "update", cm);
401 if (cm.display.showingFrom != oldFrom || cm.display.showingTo != oldTo)
402 signalLater(cm, "viewportChange", cm, cm.display.showingFrom, cm.display.showingTo);
403 }
404 updateSelection(cm);
405 updateScrollbars(cm.display, cm.doc.height);
406
407 return updated;
408 }
409
410 // Uses a set of changes plus the current scroll position to
411 // determine which DOM updates have to be made, and makes the

Callers 3

endOperationFunction · 0.85
setScrollTopFunction · 0.85
onScrollWheelFunction · 0.85

Calls 4

updateDisplayInnerFunction · 0.85
signalLaterFunction · 0.85
updateSelectionFunction · 0.85
updateScrollbarsFunction · 0.85

Tested by

no test coverage detected