[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] master cbb3ee1 262/399: counsel.el (counsel-company): Don't rely

From: Oleh Krehel
Subject: [elpa] master cbb3ee1 262/399: counsel.el (counsel-company): Don't rely on company-point
Date: Sat, 20 Jul 2019 14:57:36 -0400 (EDT)

branch: master
commit cbb3ee11e1800597feaa18efc97863fb662e5232
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>

    counsel.el (counsel-company): Don't rely on company-point
    When `company--insert-candidate' to complete the common prefix,
    neither `company-point' nor `company-prefi' is updated. So we can't
    rely on them.
    Fixes #2071
 counsel.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/counsel.el b/counsel.el
index f5d7f8d..b3092d8 100644
--- a/counsel.el
+++ b/counsel.el
@@ -398,9 +398,9 @@ Update the minibuffer with the amount of lines collected 
   (company-mode 1)
   (unless company-candidates
-  (when company-point
-    (setq ivy-completion-beg (- company-point (length company-prefix)))
-    (setq ivy-completion-end company-point)
+  (when company-common
+    (setq ivy-completion-beg (- (point) (length company-common)))
+    (setq ivy-completion-end (point))
     (ivy-read "company cand: " company-candidates
               :action #'ivy-completion-in-region-action
               :unwind #'company-abort

reply via email to

[Prev in Thread] Current Thread [Next in Thread]