MCPcopy Index your code
hub / github.com/DHTMLX/gantt / loop

Function loop

samples/common/codehighlight/codemirror.js:1076–1104  ·  view source on GitHub ↗
( o )

Source from the content-addressed store, hash-verified

1074
1075 // Run overlays, adjust style array.
1076 var loop = function ( o ) {
1077 context.baseTokens = st;
1078 var overlay = cm.state.overlays[o], i = 1, at = 0;
1079 context.state = true;
1080 runMode(cm, line.text, overlay.mode, context, function (end, style) {
1081 var start = i;
1082 // Ensure there's a token end at the current position, and that i points at it
1083 while (at < end) {
1084 var i_end = st[i];
1085 if (i_end > end)
1086 { st.splice(i, 1, end, st[i+1], i_end); }
1087 i += 2;
1088 at = Math.min(end, i_end);
1089 }
1090 if (!style) { return }
1091 if (overlay.opaque) {
1092 st.splice(start, i - start, end, "overlay " + style);
1093 i = start + 2;
1094 } else {
1095 for (; start < i; start += 2) {
1096 var cur = st[start+1];
1097 st[start+1] = (cur ? cur + " " : "") + "overlay " + style;
1098 }
1099 }
1100 }, lineClasses);
1101 context.state = state;
1102 context.baseTokens = null;
1103 context.baseTokenPos = 1;
1104 };
1105
1106 for (var o = 0; o < cm.state.overlays.length; ++o) loop( o );
1107

Callers 4

highlightLineFunction · 0.85
signalLaterFunction · 0.85
makeChangeFromHistoryFunction · 0.85
detachSharedMarkersFunction · 0.85

Calls 11

runModeFunction · 0.85
filterChangeFunction · 0.85
historyChangeFromChangeFunction · 0.85
computeSelAfterChangeFunction · 0.85
lstFunction · 0.85
makeChangeSingleDocFunction · 0.85
mergeOldSpansFunction · 0.85
changeEndFunction · 0.85
linkedDocsFunction · 0.85
indexOfFunction · 0.85
rebaseHistFunction · 0.85

Tested by

no test coverage detected