private static int adjustYToVisualLineBase(@NotNull Editor editor, int y) {
    int visualLineBaseY = editor.visualLineToY(editor.yToVisualLine(y));
    return y > visualLineBaseY && y < visualLineBaseY + editor.getLineHeight() ? visualLineBaseY : y;
  }
private static int adjustYToVisualLineBase(@NotNull Editor editor, int y)