emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] externals/ivy 2cfccf44a8 07/10: Fix company-prefix and company-co


From: Basil L. Contovounesios
Subject: [elpa] externals/ivy 2cfccf44a8 07/10: Fix company-prefix and company-common when using counsel-company.
Date: Sun, 11 Sep 2022 08:15:33 -0400 (EDT)

branch: externals/ivy
commit 2cfccf44a8441e899b1e9632df26c538cefa5d53
Author: Joe Junior <joe.fbs.junior@gmail.com>
Commit: Oleh Krehel <ohwoeowho@gmail.com>

    Fix company-prefix and company-common when using counsel-company.
    
    The company-common is always downcase, even when the prefix might not
    be. This fix allows counsel-company to use company-common even when
    the prefix has uppercase letters.
    
    It also sets company-prefix to be equal to company-common, without
    this, company-finish does not know that the prefix was expanded, and
    does not correctly removes the prefix from the candidate, generating
    duplicated characters.
---
 counsel.el | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/counsel.el b/counsel.el
index a486fe1522..8c216e8533 100644
--- a/counsel.el
+++ b/counsel.el
@@ -372,9 +372,11 @@ Update the minibuffer with the amount of lines collected 
every
   (let ((len (cond ((let (l)
                       (and company-common
                            (string= company-common
-                                    (buffer-substring
-                                     (- (point) (setq l (length 
company-common)))
-                                     (point)))
+                                    (downcase
+                                      (buffer-substring
+                                        (- (point) (setq l (length 
company-common)))
+                                        (point))))
+                           (setq company-prefix company-common)
                            l)))
                    (company-prefix
                     (length company-prefix)))))



reply via email to

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