MCPcopy Create free account
hub / github.com/witheve/Eve / rebaseHistSelSingle

Function rebaseHistSelSingle

src/codemirror.js:8091–8098  ·  view source on GitHub ↗
(pos, from, to, diff)

Source from the content-addressed store, hash-verified

8089 // Rebasing/resetting history to deal with externally-sourced changes
8090
8091 function rebaseHistSelSingle(pos, from, to, diff) {
8092 if (to < pos.line) {
8093 pos.line += diff;
8094 } else if (from < pos.line) {
8095 pos.line = from;
8096 pos.ch = 0;
8097 }
8098 }
8099
8100 // Tries to rebase an array of history events given a change in the
8101 // 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