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

Function shiftPos

tools/pythonauto/static/codemirror/codemirror.js:2434–2434  ·  view source on GitHub ↗
(pos)

Source from the content-addressed store, hash-verified

2432
2433 function shiftDoc(doc, distance) {
2434 function shiftPos(pos) {return Pos(pos.line + distance, pos.ch);}
2435 doc.first += distance;
2436 if (doc.cm) regChange(doc.cm, doc.first, doc.first, distance);
2437 doc.sel.head = shiftPos(doc.sel.head); doc.sel.anchor = shiftPos(doc.sel.anchor);

Callers 1

shiftDocFunction · 0.85

Calls 1

PosFunction · 0.85

Tested by

no test coverage detected