private void paintSelectionOnFirstSoftWrapLineIfNecessary(int visualLine,
                                                              int columnStart,
                                                              float xStart,
                                                              int y,
                                                              VisualPosition selectionStartPosition,
                                                              VisualPosition selectionEndPosition) {
      if (myEditor.isStickyLinePainting() || // suppress selection after line end on sticky lines panel IDEA-345708
          selectionStartPosition.equals(selectionEndPosition) ||
          visualLine < selectionStartPosition.line ||
          visualLine > selectionEndPosition.line ||
          visualLine == selectionEndPosition.line && selectionEndPosition.column <= columnStart) {
        return;
      }

      float startX = selectionStartPosition.line == visualLine && selectionStartPosition.column > columnStart ?
                     (float)myView.visualPositionToXY(selectionStartPosition).getX() : xStart;
      float endX = selectionEndPosition.line == visualLine ?
                   (float)myView.visualPositionToXY(selectionEndPosition).getX() : myClip.x + myClip.width;

      paintBackground(myEditor.getColorsScheme().getColor(EditorColors.SELECTION_BACKGROUND_COLOR), startX, y, endX - startX);
    }
private void paintSelectionOnFirstSoftWrapLineIfNecessary(int visualLine,
                                                              int columnStart,
                                                              float xStart,
                                                              int y,
                                                              VisualPosition selectionStartPosition,
                                                              VisualPosition selectionEndPosition)