MCPcopy Create free account
hub / github.com/DHTMLX/gantt / rebaseHistSelSingle

Function rebaseHistSelSingle

samples/common/codehighlight/codemirror.js:5497–5504  ·  view source on GitHub ↗
(pos, from, to, diff)

Source from the content-addressed store, hash-verified

5495 // Rebasing/resetting history to deal with externally-sourced changes
5496
5497 function rebaseHistSelSingle(pos, from, to, diff) {
5498 if (to < pos.line) {
5499 pos.line += diff;
5500 } else if (from < pos.line) {
5501 pos.line = from;
5502 pos.ch = 0;
5503 }
5504 }
5505
5506 // Tries to rebase an array of history events given a change in the
5507 // 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