(cm, line)
| 1516 | // measurements in a row, can thus ensure that the set-up work is |
| 1517 | // only done once. |
| 1518 | function prepareMeasureForLine(cm, line) { |
| 1519 | var lineN = lineNo(line); |
| 1520 | var view = findViewForLine(cm, lineN); |
| 1521 | if (view && !view.text) |
| 1522 | view = null; |
| 1523 | else if (view && view.changes) |
| 1524 | updateLineForChanges(cm, view, lineN, getDimensions(cm)); |
| 1525 | if (!view) |
| 1526 | view = updateExternalMeasurement(cm, line); |
| 1527 | |
| 1528 | var info = mapFromLineView(view, line, lineN); |
| 1529 | return { |
| 1530 | line: line, view: view, rect: null, |
| 1531 | map: info.map, cache: info.cache, before: info.before, |
| 1532 | hasHeights: false |
| 1533 | }; |
| 1534 | } |
| 1535 | |
| 1536 | // Given a prepared measurement object, measures the position of an |
| 1537 | // actual character (or fetches it from the cache). |
no test coverage detected