MCPcopy Create free account
hub / github.com/TruthHun/BookStack / restartBlink

Function restartBlink

static/editor.md/lib/codemirror/lib/codemirror.js:2313–2325  ·  view source on GitHub ↗
(cm)

Source from the content-addressed store, hash-verified

2311
2312 // Cursor-blinking
2313 function restartBlink(cm) {
2314 if (!cm.state.focused) return;
2315 var display = cm.display;
2316 clearInterval(display.blinker);
2317 var on = true;
2318 display.cursorDiv.style.visibility = "";
2319 if (cm.options.cursorBlinkRate > 0)
2320 display.blinker = setInterval(function() {
2321 display.cursorDiv.style.visibility = (on = !on) ? "" : "hidden";
2322 }, cm.options.cursorBlinkRate);
2323 else if (cm.options.cursorBlinkRate < 0)
2324 display.cursorDiv.style.visibility = "hidden";
2325 }
2326
2327 // HIGHLIGHT WORKER
2328

Callers 3

endOperation_W2Function · 0.70
dispatchKeyFunction · 0.70
onFocusFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected