(pos, inLineWrap)
| 1793 | return {top: top, left: left}; |
| 1794 | } |
| 1795 | function localCoords(pos, inLineWrap) { |
| 1796 | var x, lh = textHeight(), y = lh * (heightAtLine(doc, pos.line) - (inLineWrap ? displayOffset : 0)); |
| 1797 | if (pos.ch == 0) x = 0; |
| 1798 | else { |
| 1799 | var sp = measureLine(getLine(pos.line), pos.ch); |
| 1800 | x = sp.left; |
| 1801 | if (options.lineWrapping) y += Math.max(0, sp.top); |
| 1802 | } |
| 1803 | return {x: x, y: y, yBot: y + lh}; |
| 1804 | } |
| 1805 | // Coords must be lineSpace-local |
| 1806 | function coordsChar(x, y) { |
| 1807 | if (y < 0) y = 0; |
no test coverage detected