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

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

[elpa] master d2ff1dc 046/173: company--begin-new: Call `company-cancel'


From: Dmitry Gutov
Subject: [elpa] master d2ff1dc 046/173: company--begin-new: Call `company-cancel' in the unique case
Date: Thu, 23 Jun 2016 00:28:37 +0000 (UTC)

branch: master
commit d2ff1dcb0a9f8343cfe6f66d21527f81db16642f
Author: Dmitry Gutov <address@hidden>
Commit: Dmitry Gutov <address@hidden>

    company--begin-new: Call `company-cancel' in the unique case
    
    To fix a problem reported in
    http://lists.gnu.org/archive/html/help-gnu-emacs/2015-06/msg00273.html
---
 company.el |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/company.el b/company.el
index 0aa0342..ed5e14c 100644
--- a/company.el
+++ b/company.el
@@ -1472,10 +1472,13 @@ from the rest of the back-ends in the group, if any, 
will be left at the end."
           (setq company-prefix (company--prefix-str prefix)
                 company-backend backend
                 c (company-calculate-candidates company-prefix))
-          ;; t means complete/unique.  We don't start, so no hooks.
           (if (not (consp c))
-              (when company--manual-action
-                (message "No completion found"))
+              (progn
+                ;; t means complete/unique.
+                ;; Run the hooks anyway, to e.g. clear the cache.
+                (company-cancel 'unique)
+                (when company--manual-action
+                  (message "No completion found")))
             (when company--manual-action
               (setq company--manual-prefix prefix))
             (company-update-candidates c)



reply via email to

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