private boolean isRealCaretInsideTargetVisibleArea() {
    Point pointOfCaret = editor.offsetToXY(editor.getCaretModel().getOffset());
    Rectangle area = editor.getScrollingModel().getVisibleAreaOnScrollingFinished();
    return area.contains(pointOfCaret);
  }
private boolean isRealCaretInsideTargetVisibleArea()