MCPcopy Index your code
hub / github.com/csev/py4e / endOperation

Function endOperation

tools/pythonauto/static/codemirrorepl/codemirrorepl.js:2064–2092  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2062 changes = []; selectionChanged = false; callbacks = [];
2063 }
2064 function endOperation() {
2065 var reScroll = false, updated;
2066 if (maxLengthChanged) computeMaxLength();
2067 if (selectionChanged) reScroll = !scrollCursorIntoView();
2068 if (changes.length) updated = updateDisplay(changes, true);
2069 else {
2070 if (selectionChanged) updateSelection();
2071 if (gutterDirty) updateGutter();
2072 }
2073 if (reScroll) scrollCursorIntoView();
2074 if (selectionChanged) {scrollEditorIntoView(); restartBlink();}
2075
2076 if (focused && !leaveInputAlone &&
2077 (updateInput === true || (updateInput !== false && selectionChanged)))
2078 resetInput(userSelChange);
2079
2080 if (selectionChanged && options.matchBrackets)
2081 setTimeout(operation(function() {
2082 if (bracketHighlighted) {bracketHighlighted(); bracketHighlighted = null;}
2083 if (posEq(sel.from, sel.to)) matchBrackets(false);
2084 }), 20);
2085 var tc = textChanged, cbs = callbacks; // these can be reset by callbacks
2086 if (selectionChanged && options.onCursorActivity)
2087 options.onCursorActivity(instance);
2088 if (tc && options.onChange && instance)
2089 options.onChange(instance, tc);
2090 for (var i = 0; i < cbs.length; ++i) cbs[i](instance);
2091 if (updated && options.onUpdate) options.onUpdate(instance);
2092 }
2093 var nestedOperation = 0;
2094 function operation(f) {
2095 return function() {

Callers 3

slowPollFunction · 0.70
pFunction · 0.70
operationFunction · 0.70

Calls 11

updateGutterFunction · 0.85
scrollEditorIntoViewFunction · 0.85
matchBracketsFunction · 0.85
computeMaxLengthFunction · 0.70
scrollCursorIntoViewFunction · 0.70
updateDisplayFunction · 0.70
updateSelectionFunction · 0.70
restartBlinkFunction · 0.70
resetInputFunction · 0.70
operationFunction · 0.70
posEqFunction · 0.70

Tested by

no test coverage detected