private void updateCursorHighlighting() {
    hideBalloon();

    if (myCursorHighlighter != null) {
      removeHighlighter(myCursorHighlighter);
      myCursorHighlighter = null;
    }

    final FindResult cursor = mySearchResults.getCursor();
    Editor editor = mySearchResults.getEditor();
    if (cursor != null && cursor.getEndOffset() <= editor.getDocument().getTextLength()) {
      myCursorHighlighter = addHighlighter(cursor.getStartOffset(), cursor.getEndOffset(), myPresentation.getCursorAttributes(),
                                           myPresentation.getCursorLayer());
      editor.getScrollingModel().runActionOnScrollingFinished(() -> showReplacementPreview());
    }
  }
private void updateCursorHighlighting()