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

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

[elpa] externals/ivy-hydra f1c57a1 292/395: counsel.el (counsel-async-co


From: Basil L. Contovounesios
Subject: [elpa] externals/ivy-hydra f1c57a1 292/395: counsel.el (counsel-async-command-delay): Set the default to 0.0
Date: Thu, 25 Feb 2021 08:32:23 -0500 (EST)

branch: externals/ivy-hydra
commit f1c57a1a83ecf3c253924950bedab05de2d33697
Author: Oleh Krehel <ohwoeowho@gmail.com>
Commit: Oleh Krehel <ohwoeowho@gmail.com>

    counsel.el (counsel-async-command-delay): Set the default to 0.0
    
    Re #2556
---
 counsel.el | 20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)

diff --git a/counsel.el b/counsel.el
index 9bba1ef..d056608 100644
--- a/counsel.el
+++ b/counsel.el
@@ -231,7 +231,7 @@ respectively."
     (set-process-filter proc (or filter #'counsel--async-filter))
     proc))
 
-(defcustom counsel-async-command-delay 0.2
+(defcustom counsel-async-command-delay 0.0
   "Number of seconds to wait before spawning another async command."
   :type 'float
   :group 'counsel)
@@ -241,14 +241,16 @@ respectively."
 Calls to `counsel--async-command-1' are separated by at least
 `counsel-async-command-delay' seconds, so as to avoid issues
 caused by spawning too many subprocesses too quickly."
-  (when counsel--async-timer
-    (cancel-timer counsel--async-timer))
-  (setq counsel--async-timer
-        (apply #'run-with-timer
-               counsel-async-command-delay
-               nil
-               #'counsel--async-command-1
-               args)))
+  (if (= counsel-async-command-delay 0.0)
+      (apply #'counsel--async-command-1 args)
+    (when counsel--async-timer
+      (cancel-timer counsel--async-timer))
+    (setq counsel--async-timer
+          (apply #'run-with-timer
+                 counsel-async-command-delay
+                 nil
+                 #'counsel--async-command-1
+                 args))))
 
 (defun counsel--split-string (&optional str)
   (split-string



reply via email to

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