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

Function moveH

tools/pythonauto/static/codemirrorepl/codemirrorepl.js:1478–1482  ·  view source on GitHub ↗
(dir, unit)

Source from the content-addressed store, hash-verified

1476 return {line: line, ch: ch};
1477 }
1478 function moveH(dir, unit) {
1479 var pos = dir < 0 ? sel.from : sel.to;
1480 if (shiftSelecting || posEq(sel.from, sel.to)) pos = findPosH(dir, unit);
1481 setCursor(pos.line, pos.ch, true);
1482 }
1483 function deleteH(dir, unit) {
1484 if (!posEq(sel.from, sel.to)) replaceRange("", sel.from, sel.to);
1485 else if (dir < 0) replaceRange("", findPosH(dir, unit), sel.to);

Callers

nothing calls this directly

Calls 3

setCursorFunction · 0.85
posEqFunction · 0.70
findPosHFunction · 0.70

Tested by

no test coverage detected