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

Function rebaseHistSelSingle

static/editor.md/lib/codemirror/lib/codemirror.js:7828–7835  ·  view source on GitHub ↗
(pos, from, to, diff)

Source from the content-addressed store, hash-verified

7826 // Rebasing/resetting history to deal with externally-sourced changes
7827
7828 function rebaseHistSelSingle(pos, from, to, diff) {
7829 if (to < pos.line) {
7830 pos.line += diff;
7831 } else if (from < pos.line) {
7832 pos.line = from;
7833 pos.ch = 0;
7834 }
7835 }
7836
7837 // Tries to rebase an array of history events given a change in the
7838 // 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