branch: master commit c51df8fce046b089f825fb5f21e3d51aa76b6941 Author: Dmitry Gutov <dgu...@yandex.ru> Commit: Dmitry Gutov <dgu...@yandex.ru>
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))