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

Function lookup

tools/pythonauto/static/codemirrorepl/codemirror.js:4656–4672  ·  view source on GitHub ↗
(map)

Source from the content-addressed store, hash-verified

4654 // to false stopping further handling and keymap fallthrough.
4655 var lookupKey = CodeMirror.lookupKey = function(name, maps, handle) {
4656 function lookup(map) {
4657 map = getKeyMap(map);
4658 var found = map[name];
4659 if (found === false) return "stop";
4660 if (found != null && handle(found)) return true;
4661 if (map.nofallthrough) return "stop";
4662
4663 var fallthrough = map.fallthrough;
4664 if (fallthrough == null) return false;
4665 if (Object.prototype.toString.call(fallthrough) != "[object Array]")
4666 return lookup(fallthrough);
4667 for (var i = 0; i < fallthrough.length; ++i) {
4668 var done = lookup(fallthrough[i]);
4669 if (done) return done;
4670 }
4671 return false;
4672 }
4673
4674 for (var i = 0; i < maps.length; ++i) {
4675 var done = lookup(maps[i]);

Callers 1

codemirror.jsFile · 0.70

Calls 1

getKeyMapFunction · 0.70

Tested by

no test coverage detected