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

Function cmp

external/.scrollLibs.js:1095–1097  ·  view source on GitHub ↗
(a, b)

Source from the content-addressed store, hash-verified

1093 // Compare two positions, return 0 if they are the same, a negative
1094 // number when a is less, and a positive number otherwise.
1095 function cmp(a, b) {
1096 return a.line - b.line || a.ch - b.ch
1097 }
1098
1099 function equalCursorPos(a, b) {
1100 return a.sticky == b.sticky && cmp(a, b) == 0

Callers 15

equalCursorPosFunction · 0.85
maxPosFunction · 0.85
minPosFunction · 0.85
stretchSpansOverChangeFunction · 0.85
removeReadOnlyRangesFunction · 0.85
compareCollapsedMarkersFunction · 0.85
.scrollLibs.jsFile · 0.85
normalizeSelectionFunction · 0.85
adjustForChangeFunction · 0.85
computeReplacedSelFunction · 0.85
addChangeToHistoryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected