MCPcopy Index your code
hub / github.com/witheve/Eve / getX

Function getX

src/codemirror.js:2918–2925  ·  view source on GitHub ↗
(ch)

Source from the content-addressed store, hash-verified

2916 var preparedMeasure = prepareMeasureForLine(cm, lineObj);
2917
2918 function getX(ch) {
2919 var sp = cursorCoords(cm, Pos(lineNo, ch), "line", lineObj, preparedMeasure);
2920 wrongLine = true;
2921 if (innerOff > sp.bottom) return sp.left - adjust;
2922 else if (innerOff < sp.top) return sp.left + adjust;
2923 else wrongLine = false;
2924 return sp.left;
2925 }
2926
2927 var bidi = getOrder(lineObj), dist = lineObj.text.length;
2928 var from = lineLeft(lineObj), to = lineRight(lineObj);

Callers 1

coordsCharInnerFunction · 0.85

Calls 1

cursorCoordsFunction · 0.85

Tested by

no test coverage detected