MCPcopy Create free account
hub / github.com/breck7/scroll / rebaseHistSelSingle

Function rebaseHistSelSingle

external/.scrollLibs.js:7425–7432  ·  view source on GitHub ↗
(pos, from, to, diff)

Source from the content-addressed store, hash-verified

7423 // Rebasing/resetting history to deal with externally-sourced changes
7424
7425 function rebaseHistSelSingle(pos, from, to, diff) {
7426 if (to < pos.line) {
7427 pos.line += diff
7428 } else if (from < pos.line) {
7429 pos.line = from
7430 pos.ch = 0
7431 }
7432 }
7433
7434 // Tries to rebase an array of history events given a change in the
7435 // 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