MCPcopy Create free account
hub / github.com/csev/py4e / moveOnce

Function moveOnce

tools/pythonauto/static/codemirror/codemirror.js:2829–2838  ·  view source on GitHub ↗
(boundToLine)

Source from the content-addressed store, hash-verified

2827 return lineObj = getLine(doc, l);
2828 }
2829 function moveOnce(boundToLine) {
2830 var next = (visually ? moveVisually : moveLogically)(lineObj, ch, dir, true);
2831 if (next == null) {
2832 if (!boundToLine && findNextLine()) {
2833 if (visually) ch = (dir < 0 ? lineRight : lineLeft)(lineObj);
2834 else ch = dir < 0 ? lineObj.text.length : 0;
2835 } else return (possible = false);
2836 } else ch = next;
2837 return true;
2838 }
2839
2840 if (unit == "char") moveOnce();
2841 else if (unit == "column") moveOnce(true);

Callers 1

findPosHFunction · 0.70

Calls 1

findNextLineFunction · 0.70

Tested by

no test coverage detected