MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / cmp

Function cmp

lib/web/CodeMirror/src/line/pos.js:13–13  ·  view source on GitHub ↗
(a, b)

Source from the content-addressed store, hash-verified

11// Compare two positions, return 0 if they are the same, a negative
12// number when a is less, and a positive number otherwise.
13export function cmp(a, b) { return a.line - b.line || a.ch - b.ch }
14
15export function equalCursorPos(a, b) { return a.sticky == b.sticky && cmp(a, b) == 0 }
16

Callers 15

adjustForChangeFunction · 0.90
computeReplacedSelFunction · 0.90
addChangeToHistoryFunction · 0.90
markTextFunction · 0.90
copySharedMarkersFunction · 0.90
extendRangeFunction · 0.90
setSelectionNoUndoFunction · 0.90
skipAtomicInnerFunction · 0.90
makeChangeInnerFunction · 0.90
replaceRangeFunction · 0.90
containsMethod · 0.90
normalizeSelectionFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected