branch: externals/ivy-hydra
commit 7b3b67276ae47d8000c29c565ab8007c87a5ffa5
Author: Oleh Krehel <[email protected]>
Commit: Oleh Krehel <[email protected]>

    counsel.el (counsel-company): Fix difference between company-common and 
company-prefix
    
    Fixes #2385
---
 counsel.el | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/counsel.el b/counsel.el
index 4b6057d..f6da084 100644
--- a/counsel.el
+++ b/counsel.el
@@ -403,8 +403,13 @@ Update the minibuffer with the amount of lines collected 
every
   (company-mode 1)
   (unless company-candidates
     (company-complete))
-  (let ((len (cond (company-common
-                    (length company-common))
+  (let ((len (cond ((let (l)
+                      (and company-common
+                           (string= company-common
+                                    (buffer-substring
+                                     (- (point) (setq l (length 
company-common)))
+                                     (point)))
+                           l)))
                    (company-prefix
                     (length company-prefix)))))
     (when len

Reply via email to