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

Function Pos

external/.scrollLibs.js:1082–1091  ·  view source on GitHub ↗
(line, ch, sticky)

Source from the content-addressed store, hash-verified

1080
1081 // A Pos instance represents a position within the text.
1082 function Pos(line, ch, sticky) {
1083 if (sticky === void 0) sticky = null
1084
1085 if (!(this instanceof Pos)) {
1086 return new Pos(line, ch, sticky)
1087 }
1088 this.line = line
1089 this.ch = ch
1090 this.sticky = sticky
1091 }
1092
1093 // Compare two positions, return 0 if they are the same, a negative
1094 // number when a is less, and a positive number otherwise.

Callers 15

copyPosFunction · 0.85
clipPosFunction · 0.85
clipToLenFunction · 0.85
PosWithInfoFunction · 0.85
coordsCharInnerFunction · 0.85
coordsBidiPartFunction · 0.85
posFromMouseFunction · 0.85
coordsFunction · 0.85
scrollPosIntoViewFunction · 0.85
changeEndFunction · 0.85
adjustForChangeFunction · 0.85
offsetPosFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected