MCPcopy
hub / github.com/DHTMLX/gantt / changeEnd

Function changeEnd

samples/common/codehighlight/codemirror.js:4630–4634  ·  view source on GitHub ↗
(change)

Source from the content-addressed store, hash-verified

4628 // Compute the position of the end of a change (its 'to' property
4629 // refers to the pre-change end).
4630 function changeEnd(change) {
4631 if (!change.text) { return change.to }
4632 return Pos(change.from.line + change.text.length - 1,
4633 lst(change.text).length + (change.text.length == 1 ? change.from.ch : 0))
4634 }
4635
4636 // Adjust a position to refer to the post-change position of the
4637 // same text, or the end of the change if the change covers it.

Callers 6

adjustForChangeFunction · 0.85
computeReplacedSelFunction · 0.85
historyChangeFromChangeFunction · 0.85
addChangeToHistoryFunction · 0.85
loopFunction · 0.85

Calls 2

PosFunction · 0.85
lstFunction · 0.85

Tested by

no test coverage detected