   '(("ERROR" . ycmd--error-button)
     ("WARNING" . ycmd--warning-button))
   "A mapping from parse 'kind' to button types.")
+
+(defun ycmd--line-start-position (line)
+  "Find position at the start of LINE."
+  (save-excursion
+    (goto-line line)
+    (beginning-of-line)
+    (point)))
+
+(defun ycmd--line-end-position (line)
+  "Find position at the end of LINE."
+  (save-excursion
+    (goto-line line)
+    (end-of-line)
+    (point)))
 
 (defun ycmd--decorate-single-parse-result (r)
   "Decorates a buffer based on the contents of a single parse

        ))))

(defun ycmd-display-file-parse-results ()
  (interactive)
  (deferred:$
    (ycmd-notify-file-ready-to-parse)

      r
    (awhen (find-buffer-visiting filepath)
      (with-current-buffer it
        (let* ((start-pos (ycmd--line-start-position line-num))
               (end-pos (ycmd--line-end-position line-num))
               (btype (assoc-default kind ycmd--file-ready-buttons)))
          (when btype
            (with-silent-modifications
              (ycmd--make-button
