MCPcopy
hub / github.com/nwutils/nw-sample-apps / findNextLine

Function findNextLine

mini-code-edit/cm/lib/codemirror.js:1252–1257  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1250 var end = sel.inverted ? sel.from : sel.to, line = end.line, ch = end.ch;
1251 var lineObj = getLine(line);
1252 function findNextLine() {
1253 for (var l = line + dir, e = dir < 0 ? -1 : doc.size; l != e; l += dir) {
1254 var lo = getLine(l);
1255 if (!lo.hidden) { line = l; lineObj = lo; return true; }
1256 }
1257 }
1258 function moveOnce(boundToLine) {
1259 if (ch == (dir < 0 ? 0 : lineObj.text.length)) {
1260 if (!boundToLine && findNextLine()) ch = dir < 0 ? lineObj.text.length : 0;

Callers 1

moveOnceFunction · 0.85

Calls 1

getLineFunction · 0.85

Tested by

no test coverage detected