private @Nullable RangeHighlighter getNearestRangeHighlighter(@NotNull MouseEvent e) {
    Set<RangeHighlighter> highlighters = getNearestHighlighters(e.getY());
    RangeHighlighter nearestMarker = null;
    int yPos = 0;
    for (RangeHighlighter highlighter : highlighters) {
      int newYPos = offsetsToYPositions(highlighter.getStartOffset(), highlighter.getEndOffset()).getStartOffset();

      if (nearestMarker == null || Math.abs(yPos - e.getY()) > Math.abs(newYPos - e.getY())) {
        nearestMarker = highlighter;
        yPos = newYPos;
      }
    }
    return nearestMarker;
  }
private @Nullable RangeHighlighter getNearestRangeHighlighter(@NotNull MouseEvent e)