MCPcopy Create free account
hub / github.com/sql-js/sql.js / offsetPos

Function offsetPos

GUI/codemirror/lib/codemirror.js:3243–3248  ·  view source on GitHub ↗
(pos, old, nw)

Source from the content-addressed store, hash-verified

3241 }
3242
3243 function offsetPos(pos, old, nw) {
3244 if (pos.line == old.line)
3245 return Pos(nw.line, pos.ch - old.ch + nw.ch);
3246 else
3247 return Pos(nw.line + (pos.line - old.line), pos.ch);
3248 }
3249
3250 // Used by replaceSelections to allow moving the selection to the
3251 // start or around the replaced test. Hint may be "start" or "around".

Callers 1

computeReplacedSelFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…