]> code.delx.au - gnu-emacs-elpa/commitdiff
company--insert-candidate: Insert before overlays that begin at point
authorDmitry Gutov <dgutov@yandex.ru>
Sat, 13 Sep 2014 20:33:06 +0000 (00:33 +0400)
committerDmitry Gutov <dgutov@yandex.ru>
Sat, 13 Sep 2014 20:33:06 +0000 (00:33 +0400)
That fixes `company-with-candidate-inserted' to work with the way the
pseudo-tooltip overlay is now rendered (at the end of the current line).

company.el

index dab54e629774bb08d0a71da4be8e5f27d10399c3..79b72d5aacb9fbaee945d11b17a78c6397afc95c 100644 (file)
@@ -978,7 +978,7 @@ Controlled by `company-auto-complete'.")
   (if (eq (company-call-backend 'ignore-case) 'keep-prefix)
       (insert (company-strip-prefix candidate))
     (delete-region (- (point) (length company-prefix)) (point))
-    (insert candidate)))
+    (insert-before-markers candidate)))
 
 (defmacro company-with-candidate-inserted (candidate &rest body)
   "Evaluate BODY with CANDIDATE temporarily inserted.