MCPcopy Create free account
hub / github.com/witheve/Eve / findEnd

Function findEnd

src/codemirror.js:9058–9067  ·  view source on GitHub ↗
(cm, pos, by, dir)

Source from the content-addressed store, hash-verified

9056 }
9057
9058 function findEnd(cm, pos, by, dir) {
9059 var prefix = getPrefix(cm);
9060 if (prefix < 0) { dir = -dir; prefix = -prefix; }
9061 for (var i = 0; i < prefix; ++i) {
9062 var newPos = by(cm, pos, dir);
9063 if (posEq(newPos, pos)) break;
9064 pos = newPos;
9065 }
9066 return pos;
9067 }
9068
9069 function move(by, dir) {
9070 var f = function(cm) {

Callers 3

fFunction · 0.85
killToFunction · 0.85
codemirror.jsFile · 0.85

Calls 2

getPrefixFunction · 0.85
posEqFunction · 0.85

Tested by

no test coverage detected