MCPcopy
hub / github.com/nwutils/nw-sample-apps / findMarksAt

Function findMarksAt

mini-code-edit/cm/lib/codemirror.js:1457–1468  ·  view source on GitHub ↗
(pos)

Source from the content-addressed store, hash-verified

1455 }
1456
1457 function findMarksAt(pos) {
1458 pos = clipPos(pos);
1459 var markers = [], marked = getLine(pos.line).marked;
1460 if (!marked) return markers;
1461 for (var i = 0, e = marked.length; i < e; ++i) {
1462 var m = marked[i];
1463 if ((m.from == null || m.from <= pos.ch) &&
1464 (m.to == null || m.to >= pos.ch))
1465 markers.push(m.marker || m);
1466 }
1467 return markers;
1468 }
1469
1470 function addGutterMarker(line, text, className) {
1471 if (typeof line == "number") line = getLine(clipLine(line));

Callers

nothing calls this directly

Calls 2

clipPosFunction · 0.85
getLineFunction · 0.85

Tested by

no test coverage detected