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

Function doHandleBinding

tools/pythonauto/static/codemirrorepl/codemirror.js:2939–2957  ·  view source on GitHub ↗
(cm, bound, dropShift)

Source from the content-addressed store, hash-verified

2937
2938 // Run a handler that was bound to a key.
2939 function doHandleBinding(cm, bound, dropShift) {
2940 if (typeof bound == "string") {
2941 bound = commands[bound];
2942 if (!bound) return false;
2943 }
2944 // Ensure previous input has been read, so that the handler sees a
2945 // consistent view of the document
2946 if (cm.display.pollingFast && readInput(cm)) cm.display.pollingFast = false;
2947 var prevShift = cm.display.shift, done = false;
2948 try {
2949 if (isReadOnly(cm)) cm.state.suppressEdits = true;
2950 if (dropShift) cm.display.shift = false;
2951 done = bound(cm) != Pass;
2952 } finally {
2953 cm.display.shift = prevShift;
2954 cm.state.suppressEdits = false;
2955 }
2956 return done;
2957 }
2958
2959 // Collect the currently active keymaps.
2960 function allKeyMaps(cm) {

Callers 2

handleKeyBindingFunction · 0.70
handleCharBindingFunction · 0.70

Calls 3

readInputFunction · 0.70
isReadOnlyFunction · 0.70
boundFunction · 0.50

Tested by

no test coverage detected