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

Function doHandleBinding

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

Source from the content-addressed store, hash-verified

2075 }
2076
2077 function doHandleBinding(cm, bound, dropShift) {
2078 if (typeof bound == "string") {
2079 bound = commands[bound];
2080 if (!bound) return false;
2081 }
2082 // Ensure previous input has been read, so that the handler sees a
2083 // consistent view of the document
2084 if (cm.display.pollingFast && readInput(cm)) cm.display.pollingFast = false;
2085 var doc = cm.doc, prevShift = doc.sel.shift, done = false;
2086 try {
2087 if (isReadOnly(cm)) cm.state.suppressEdits = true;
2088 if (dropShift) doc.sel.shift = false;
2089 done = bound(cm) != Pass;
2090 } finally {
2091 doc.sel.shift = prevShift;
2092 cm.state.suppressEdits = false;
2093 }
2094 return done;
2095 }
2096
2097 function allKeyMaps(cm) {
2098 var maps = cm.state.keyMaps.slice(0);

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