   (looking-back company-ycmd--include-declaration
                 (line-beginning-position)))
 
+(defun company-ycmd--add-start-col (prefix)
+  "Add a start-column property to a prefix string PREFIX.
+
+This just looks at the current position and subtracts the length
+of PREFIX."
+  (when (not (s-blank? prefix))
+    (put-text-property
+     0 1
+     'start-col
+     (- (+ 1 (current-column)) (length prefix))
+     prefix))
+  prefix)
+
 (defun company-ycmd--prefix ()
   "Prefix-command handler for the company backend."
   (when (ycmd-parsing-in-progress-p)

                  (company-ycmd--prefix-candidate-p candidate prefix))
          (if function-signatures
              (dolist (meta (delete-dups function-signatures))
                (push (company-ycmd--construct-candidate candidate meta)
                      candidates))
            (push (company-ycmd--construct-candidate candidate)
                  candidates)))))))

(defun company-ycmd--construct-candidate (src &optional meta)
  "Convert a ycmd completion structure SRC to a candidate string.

META is a string containig the function signature and is used to

        (case-fold-search t))
    (equal (string-match (regexp-quote prefix) insertion-text) 0)))

(defun company-ycmd--construct-candidates (start-col
					   completion-vector
					   prefix)
  "Contruct candidates list from COMPLETION-VECTOR.

PREFIX is the prefix we calculated for doing the completion, and
START-COL is the column on which ycmd indicates we should place
the completion candidates.

When `company-ycmd-enable-fuzzy-matching' is nil, check if
candidate starts with PREFIX, whether to include candidate in
