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

Function changeEnd

external/.scrollLibs.js:6392–6397  ·  view source on GitHub ↗
(change)

Source from the content-addressed store, hash-verified

6390 // Compute the position of the end of a change (its 'to' property
6391 // refers to the pre-change end).
6392 function changeEnd(change) {
6393 if (!change.text) {
6394 return change.to
6395 }
6396 return Pos(change.from.line + change.text.length - 1, lst(change.text).length + (change.text.length == 1 ? change.from.ch : 0))
6397 }
6398
6399 // Adjust a position to refer to the post-change position of the
6400 // 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
loadFileFunction · 0.85

Calls 2

PosFunction · 0.85
lstFunction · 0.85

Tested by

no test coverage detected