MCPcopy
hub / github.com/csev/py4e / lineStart

Function lineStart

tools/pythonauto/static/codemirrorepl/codemirror.js:7208–7215  ·  view source on GitHub ↗
(cm, lineN)

Source from the content-addressed store, hash-verified

7206 }
7207
7208 function lineStart(cm, lineN) {
7209 var line = getLine(cm.doc, lineN);
7210 var visual = visualLine(line);
7211 if (visual != line) lineN = lineNo(visual);
7212 var order = getOrder(visual);
7213 var ch = !order ? 0 : order[0].level % 2 ? lineRight(visual) : lineLeft(visual);
7214 return Pos(lineN, ch);
7215 }
7216 function lineEnd(cm, lineN) {
7217 var merged, line = getLine(cm.doc, lineN);
7218 while (merged = collapsedSpanAtEnd(line)) {

Callers 1

codemirror.jsFile · 0.70

Calls 7

PosFunction · 0.85
getLineFunction · 0.70
visualLineFunction · 0.70
lineNoFunction · 0.70
getOrderFunction · 0.70
lineRightFunction · 0.70
lineLeftFunction · 0.70

Tested by

no test coverage detected