     (when (and ycmd-mode (not (eq beg end)))
       (ycmd--kill-notification-timer)
       (if (string-match-p "\n" (buffer-substring beg end))
-          (ycmd--set-buffer-needs-parse 'new-line)
+          (ycmd--conditional-parse 'new-line)
         (setq ycmd--notification-timer
               (run-at-time ycmd-idle-change-delay nil
                            #'ycmd--on-idle-change))))))

  :lighter " ycmd"
  :group 'ycmd
  :require 'ycmd
  :after-hook (ycmd--set-buffer-needs-parse 'mode-enabled)
  (cond
   (ycmd-mode
    (dolist (hook ycmd-hooks-alist)

           (ycmd--log-content "HTTP RESPONSE CONTENT" content)
           content))))))

(defun ycmd--conditional-parse (&optional condition)
  "Reparse the buffer if CONDITION is in `ycmd-parse-conditions'
or is nil."
  (when (and ycmd-mode
             (or (not condition)
                 (memq condition ycmd-parse-conditions)))
