@Override
  public void paint(@NotNull Editor editor, @NotNull RangeHighlighter highlighter, @NotNull Graphics g) {
    if (DiffUtil.isUserDataFlagSet(DiffDrawUtil.EDITOR_WITH_HIGH_PRIORITY_RENDERER, editor)) {
      MarkupModelEx markupModel = (MarkupModelEx)editor.getMarkupModel();
      CommonProcessors.FindProcessor<RangeHighlighterEx> processor = new CommonProcessors.FindProcessor<>() {
        @Override
        protected boolean accept(RangeHighlighterEx ex) {
          return ex.getLayer() > highlighter.getLayer() &&
                 ex.getCustomRenderer() instanceof DiffDrawUtil.DiffLayeredRendererMarker;
        }
      };
      markupModel.processRangeHighlightersOverlappingWith(highlighter.getStartOffset(), highlighter.getEndOffset(), processor);
      if (processor.isFound()) return; // range with higher layerPriority found
    }

    g.setColor(myDiffType.getColor(editor));
    Point point = editor.logicalPositionToXY(editor.offsetToLogicalPosition(highlighter.getStartOffset()));
    g.fillRect(point.x - JBUIScale.scale(1), point.y, JBUIScale.scale(2), editor.getLineHeight());
  }
@Override
  public void paint(@NotNull Editor editor, @NotNull RangeHighlighter highlighter, @NotNull Graphics g)