                     (let* ((beg (point))
                            (end (diff-end-of-hunk))
                            (diff (buffer-substring-no-properties beg end)))
-                      (setq diffs (cons (list diff filepath
-                                              (> (length chunks-by-filepath) 1))
+                      (setq diffs (cons (list diff filepath multiple-files-p)
                                         diffs)))))))))))))
 
 (define-button-type 'ycmd--fixit-button

    (pop-to-buffer fixits-buffer)
    (setq next-error-last-buffer fixits-buffer)))

(defun ycmd--get-fixit-diff (chunks)
  "Return diff string for CHUNKS."
  (let (diffs)
    (ycmd--loop-chunks-by-filename (chunks (nreverse diffs))
      (cl-destructuring-bind (filepath . chunk) it
        (let* ((buffer (find-file-noselect filepath))
               (buffertext (with-current-buffer buffer (buffer-string))))
          (with-temp-buffer
            (insert buffertext)

      (dolist (fixit fixits)
        (let-alist fixit
          (let (button-diff)
            (-when-let (diffs (ycmd--get-fixit-diffs .chunks))
              (dolist (diff diffs)
                (cl-destructuring-bind (diff-text diff-path show-path-p) diff
                  (setq button-diff
                        (concat button-diff (when (or (s-blank-str? .text)
                                                      show-path-p)
                                              (format "%s\n" diff-path))
                                (ycmd--fontify-code diff-text 'diff-mode) "\n")))))
            (ycmd--insert-fixit-button
             (concat (format "%d: %s\n" fixit-num .text) button-diff)
             .chunks .location.filepath)
