Hmmm, you're right. One option might be to call `getScrollInfo()` to get the pixel positions of the top and bottom of the visible scroll area (you probably need to use `info.top` and `info.top + info.clientHeight`), then map those to lines using `coordsChar()`.