int () { Rectangle visibleArea = editor.getScrollingModel().getVisibleAreaOnScrollingFinished(); return editor.logicalPositionToOffset(editor.xyToLogicalPosition(new Point( 0, visibleArea.y + editor.getLineHeight()))); }