MCPcopy Create free account
hub / github.com/TruthHun/BookStack / rebaseHistSelSingle

Function rebaseHistSelSingle

static/mergely/lib/codemirror.js:8059–8066  ·  view source on GitHub ↗
(pos, from, to, diff)

Source from the content-addressed store, hash-verified

8057 // Rebasing/resetting history to deal with externally-sourced changes
8058
8059 function rebaseHistSelSingle(pos, from, to, diff) {
8060 if (to < pos.line) {
8061 pos.line += diff;
8062 } else if (from < pos.line) {
8063 pos.line = from;
8064 pos.ch = 0;
8065 }
8066 }
8067
8068 // Tries to rebase an array of history events given a change in the
8069 // document. If the change touches the same lines as the event, the

Callers 1

rebaseHistArrayFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected