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

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

[elpa] master b22df34 60/78: Use inhibit-redisplay


From: Dmitry Gutov
Subject: [elpa] master b22df34 60/78: Use inhibit-redisplay
Date: Sun, 18 Feb 2018 07:40:26 -0500 (EST)

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

    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)



reply via email to

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