MCPcopy Create free account
hub / github.com/DHTMLX/gantt / skipAtomic

Function skipAtomic

samples/common/codehighlight/codemirror.js:5201–5212  ·  view source on GitHub ↗
(doc, pos, oldPos, bias, mayClear)

Source from the content-addressed store, hash-verified

5199
5200 // Ensure a given position is not inside an atomic range.
5201 function skipAtomic(doc, pos, oldPos, bias, mayClear) {
5202 var dir = bias || 1;
5203 var found = skipAtomicInner(doc, pos, oldPos, dir, mayClear) ||
5204 (!mayClear && skipAtomicInner(doc, pos, oldPos, dir, true)) ||
5205 skipAtomicInner(doc, pos, oldPos, -dir, mayClear) ||
5206 (!mayClear && skipAtomicInner(doc, pos, oldPos, -dir, true));
5207 if (!found) {
5208 doc.cantEdit = true;
5209 return Pos(doc.first, 0)
5210 }
5211 return found
5212 }
5213
5214 function movePos(doc, pos, dir, line) {
5215 if (dir < 0 && pos.ch == 0) {

Callers 3

skipAtomicInSelectionFunction · 0.85
makeChangeSingleDocFunction · 0.85
findPosHFunction · 0.85

Calls 2

skipAtomicInnerFunction · 0.85
PosFunction · 0.85

Tested by

no test coverage detected