(len)
| 1752 | if (x <= 0) return 0; |
| 1753 | var lineObj = getLine(line), text = lineObj.text; |
| 1754 | function getX(len) { |
| 1755 | return measureLine(lineObj, len).left; |
| 1756 | } |
| 1757 | var from = 0, fromX = 0, to = text.length, toX; |
| 1758 | // Guess a suitable upper bound for our search. |
| 1759 | var estimated = Math.min(to, Math.ceil(x / charWidth())); |
no test coverage detected