]> code.delx.au - gnu-emacs-elpa/commitdiff
company--insert-candidate: Don't use `insert-before-markers'
authorDmitry Gutov <dgutov@yandex.ru>
Mon, 22 Sep 2014 03:10:10 +0000 (07:10 +0400)
committerDmitry Gutov <dgutov@yandex.ru>
Mon, 22 Sep 2014 03:10:22 +0000 (07:10 +0400)
Fixes #189.

Apparently, it's enough to pass t REAR-ADVANCE agrument to `make-overlay' when
creating the pseudo-tooltip overlay.

company.el

index c47c72e4b20d1c05b85acc758ff4c9cd48d8e39c..15a6eeed6b3e07a02007d95007dd1692272ffc4c 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-before-markers candidate)))
+    (insert candidate)))
 
 (defmacro company-with-candidate-inserted (candidate &rest body)
   "Evaluate BODY with CANDIDATE temporarily inserted.
@@ -2388,7 +2388,7 @@ Returns a negative number if the tooltip should be displayed above point."
              (end (save-excursion
                     (move-to-window-line (+ row (abs height)))
                     (point)))
-             (ov (make-overlay (if nl beg (1- beg)) end nil t))
+             (ov (make-overlay (if nl beg (1- beg)) end nil t t))
              (args (list (mapcar 'company-plainify
                                  (company-buffer-lines beg end))
                          column nl above)))