private static @NotNull Rectangle getVisibleArea(@NotNull Editor editor) {
    ScrollingModel model = editor.getScrollingModel();
    return EditorCoreUtil.isTrueSmoothScrollingEnabled() ? model.getVisibleAreaOnScrollingFinished() : model.getVisibleArea();
  }
private static @NotNull Rectangle getVisibleArea(@NotNull Editor editor)