(pos, inLineWrap)
| 1593 | return {top: top, left: left}; |
| 1594 | } |
| 1595 | function localCoords(pos, inLineWrap) { |
| 1596 | var x, lh = textHeight(), y = lh * (heightAtLine(doc, pos.line) - (inLineWrap ? displayOffset : 0)); |
| 1597 | if (pos.ch == 0) x = 0; |
| 1598 | else { |
| 1599 | var sp = measureLine(getLine(pos.line), pos.ch); |
| 1600 | x = sp.left; |
| 1601 | if (options.lineWrapping) y += Math.max(0, sp.top); |
| 1602 | } |
| 1603 | return {x: x, y: y, yBot: y + lh}; |
| 1604 | } |
| 1605 | // Coords must be lineSpace-local |
| 1606 | function coordsChar(x, y) { |
| 1607 | if (y < 0) y = 0; |
no test coverage detected