branch: master commit b22df348da8cfce6734be078e713286e22889409 Author: Dmitry Gutov <dgu...@yandex.ru> Commit: Dmitry Gutov <dgu...@yandex.ru>
Use inhibit-redisplay #510 and #654 --- company.el | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/company.el b/company.el index 173266d..dc75183 100644 --- a/company.el +++ b/company.el @@ -1223,19 +1223,15 @@ can retrieve meta-data for them." (company-call-backend-raw 'candidates prefix)))) (if (not (eq (car c) :async)) c - (let ((res 'none)) + (let ((res 'none) + (inhibit-redisplay t)) (funcall (cdr c) (lambda (candidates) (setq res candidates))) (while (and (eq res 'none) (not (input-pending-p t))) - ;; FIXME: This still leads to flickers. - ;; Apparently sit-for triggers redisplay anyway. - (sleep-for company-async-wait)) - ;; (if (listp res) - ;; (message "res len is %s" (length res)) - ;; (message "none")) + (sit-for company-async-wait t)) (and (consp res) res))))) (defun company--preprocess-candidates (candidates)