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

Function getNonHidden

tools/pythonauto/static/codemirrorepl/codemirrorepl.js:1416–1427  ·  view source on GitHub ↗
(dir)

Source from the content-addressed store, hash-verified

1414 }
1415 function skipHidden(pos, oldLine, oldCh) {
1416 function getNonHidden(dir) {
1417 var lNo = pos.line + dir, end = dir == 1 ? doc.size : -1;
1418 while (lNo != end) {
1419 var line = getLine(lNo);
1420 if (!line.hidden) {
1421 var ch = pos.ch;
1422 if (toEnd || ch > oldCh || ch > line.text.length) ch = line.text.length;
1423 return {line: lNo, ch: ch};
1424 }
1425 lNo += dir;
1426 }
1427 }
1428 var line = getLine(pos.line);
1429 var toEnd = pos.ch == line.text.length && pos.ch != oldCh;
1430 if (!line.hidden) return pos;

Callers 1

skipHiddenFunction · 0.85

Calls 1

getLineFunction · 0.70

Tested by

no test coverage detected