               (assoc-default 'column_num location)
               (assoc-default 'line_num location))))
 
+(defun ycmd--goto-line (line)
+  "Go to LINE."
+  (goto-char (point-min))
+  (forward-line (1- line)))
+
 (defun ycmd--col-line-to-position (col line &optional buffer)
   "Convert COL and LINE into a position in the current buffer.
 

(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)))


    (if (= col 0)
        0
      (with-current-buffer buff
        (ycmd--goto-line line)
        (forward-char (- col 1))
        (point)))))

