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

Function rebaseHistSel

tools/pythonauto/static/codemirror/codemirror.js:5410–5417  ·  view source on GitHub ↗
(pos, from, to, diff)

Source from the content-addressed store, hash-verified

5408 // Rebasing/resetting history to deal with externally-sourced changes
5409
5410 function rebaseHistSel(pos, from, to, diff) {
5411 if (to < pos.line) {
5412 pos.line += diff;
5413 } else if (from < pos.line) {
5414 pos.line = from;
5415 pos.ch = 0;
5416 }
5417 }
5418
5419 // Tries to rebase an array of history events given a change in the
5420 // document. If the change touches the same lines as the event, the

Callers 1

rebaseHistArrayFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected