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

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

[elpa] master 724e6dd 136/173: Delete the cache when async completion ab


From: Dmitry Gutov
Subject: [elpa] master 724e6dd 136/173: Delete the cache when async completion aborts
Date: Thu, 23 Jun 2016 00:28:45 +0000 (UTC)

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

    Delete the cache when async completion aborts
    
    Fixes #467
---
 company.el |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/company.el b/company.el
index e3fd22c..51aad7b 100644
--- a/company.el
+++ b/company.el
@@ -1186,7 +1186,11 @@ can retrieve meta-data for them."
                    company-candidates-cache
                    (list (cons prefix
                                (company--preprocess-candidates candidates))))
-             (company-idle-begin buf win tick pt)))))
+             (unwind-protect
+                 (company-idle-begin buf win tick pt)
+               (unless company-candidates
+                 (setq company-backend nil
+                       company-candidates-cache nil)))))))
       ;; FIXME: Relying on the fact that the callers
       ;; will interpret nil as "do nothing" is shaky.
       ;; A throw-catch would be one possible improvement.



reply via email to

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