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

Function shiftDoc

tools/pythonauto/static/codemirror/codemirror.js:2433–2439  ·  view source on GitHub ↗
(doc, distance)

Source from the content-addressed store, hash-verified

2431 }
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);
2438 doc.sel.from = shiftPos(doc.sel.from); doc.sel.to = shiftPos(doc.sel.to);
2439 }
2440
2441 function makeChangeSingleDoc(doc, change, selAfter, spans) {
2442 if (doc.cm && !doc.cm.curOp)

Callers 1

makeChangeSingleDocFunction · 0.70

Calls 2

shiftPosFunction · 0.85
regChangeFunction · 0.70

Tested by

no test coverage detected