MCPcopy Create free account
hub / github.com/ronreiter/interactive-tutorials / shiftPos

Function shiftPos

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

Source from the content-addressed store, hash-verified

2176
2177 function shiftDoc(doc, distance) {
2178 function shiftPos(pos) {return Pos(pos.line + distance, pos.ch);}
2179 doc.first += distance;
2180 if (doc.cm) regChange(doc.cm, doc.first, doc.first, distance);
2181 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