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

Function rebaseHistSel

static/js/codemirror/codemirror.js:4761–4768  ·  view source on GitHub ↗
(pos, from, to, diff)

Source from the content-addressed store, hash-verified

4759 // Rebasing/resetting history to deal with externally-sourced changes
4760
4761 function rebaseHistSel(pos, from, to, diff) {
4762 if (to < pos.line) {
4763 pos.line += diff;
4764 } else if (from < pos.line) {
4765 pos.line = from;
4766 pos.ch = 0;
4767 }
4768 }
4769
4770 // Tries to rebase an array of history events given a change in the
4771 // 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