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

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

[elpa] master c51df8f 76/78: Fix #760 in a different way


From: Dmitry Gutov
Subject: [elpa] master c51df8f 76/78: Fix #760 in a different way
Date: Sun, 18 Feb 2018 07:40:30 -0500 (EST)

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

    Fix #760 in a different way
    
    Without clobbering idle completion after interrupted async
---
 company.el | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/company.el b/company.el
index 915f1bd..dc9c37b 100644
--- a/company.el
+++ b/company.el
@@ -1238,11 +1238,16 @@ can retrieve meta-data for them."
          (cdr c)
          (lambda (candidates)
            (when (eq res 'none)
-             (push 'company-dummy-event unread-command-events))
+             (push 'company-foo unread-command-events))
            (setq res candidates)))
         (while (and (eq res 'none)
                     (sit-for 0.5 t)))
-        (and (consp res) res)))))
+        (while (member (car unread-command-events)
+                       '(company-foo (t . company-foo)))
+          (pop unread-command-events))
+        (prog1
+            (and (consp res) res)
+          (setq res 'exited))))))
 
 (defun company--preprocess-candidates (candidates)
   (cl-assert (cl-every #'stringp candidates))



reply via email to

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