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

Function lineEnd

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

Source from the content-addressed store, hash-verified

7214 return Pos(lineN, ch);
7215 }
7216 function lineEnd(cm, lineN) {
7217 var merged, line = getLine(cm.doc, lineN);
7218 while (merged = collapsedSpanAtEnd(line)) {
7219 line = merged.find(1, true).line;
7220 lineN = null;
7221 }
7222 var order = getOrder(line);
7223 var ch = !order ? line.text.length : order[0].level % 2 ? lineLeft(line) : lineRight(line);
7224 return Pos(lineN == null ? lineNo(line) : lineN, ch);
7225 }
7226
7227 function compareBidiLevel(order, a, b) {
7228 var linedir = order[0].level;

Callers 1

codemirror.jsFile · 0.70

Calls 8

PosFunction · 0.85
getLineFunction · 0.70
collapsedSpanAtEndFunction · 0.70
getOrderFunction · 0.70
lineLeftFunction · 0.70
lineRightFunction · 0.70
lineNoFunction · 0.70
findMethod · 0.45

Tested by

no test coverage detected