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

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

[nongnu] elpa/helm 75f93f0567 2/2: Add a new slot follow-delay-in-update


From: ELPA Syncer
Subject: [nongnu] elpa/helm 75f93f0567 2/2: Add a new slot follow-delay-in-update and use it
Date: Sat, 24 Jun 2023 13:01:48 -0400 (EDT)

branch: elpa/helm
commit 75f93f056710cb035160ae077d4e015ce4e6a0ba
Author: Thierry Volpiatto <thievol@posteo.net>
Commit: Thierry Volpiatto <thievol@posteo.net>

    Add a new slot follow-delay-in-update and use it
    
    When a source may take some time to update, trying to
    execute-persistent-action may prevent one of the FCT to finish
    properly, so delaying it let the time to helm to update its candidates.
---
 helm-core.el   | 17 +++++++++--------
 helm-files.el  |  1 +
 helm-source.el |  7 +++++++
 3 files changed, 17 insertions(+), 8 deletions(-)

diff --git a/helm-core.el b/helm-core.el
index e506c95196..2d190d2851 100644
--- a/helm-core.el
+++ b/helm-core.el
@@ -7728,14 +7728,15 @@ This happen after: DELAY or the \\='follow-attr value 
of current
 source or `helm-follow-input-idle-delay' or
 `helm-input-idle-delay' secs."
   (let* ((src (helm-get-current-source))
-         (at (or delay
-                 (assoc-default 'follow-delay src)
-                 helm-follow-input-idle-delay
-                 (or (and helm-input-idle-delay
-                          (max helm-input-idle-delay 0.01))
-                     0.01))))
-    (when (and (not helm--in-update) ; Wait end of update.
-               (not (get-buffer-window helm-action-buffer 'visible))
+         (at (if helm--in-update
+                 (or (assoc-default 'follow-delay-in-update src) 1)
+               (or delay
+                   (assoc-default 'follow-delay src)
+                   helm-follow-input-idle-delay
+                   (or (and helm-input-idle-delay
+                            (max helm-input-idle-delay 0.01))
+                       0.01)))))
+    (when (and (not (get-buffer-window helm-action-buffer 'visible))
                (not (helm-pos-header-line-p))
                (or (helm-follow-mode-p src)
                    (and helm-follow-mode-persistent
diff --git a/helm-files.el b/helm-files.el
index a0a5b8ffb4..57cea4fec1 100644
--- a/helm-files.el
+++ b/helm-files.el
@@ -1027,6 +1027,7 @@ Should not be used among other sources.")
                        (remhash helm-ff-default-directory
                                 helm-ff--list-directory-cache)))
    (match-on-real :initform t)
+   (follow-delay-in-update :initform 1.5)
    (filtered-candidate-transformer
     :initform '(helm-ff-fct
                 helm-ff-maybe-show-thumbnails
diff --git a/helm-source.el b/helm-source.el
index 2ca2ac1281..0b1bde5e24 100644
--- a/helm-source.el
+++ b/helm-source.el
@@ -626,6 +626,13 @@
   Otherwise value of `helm-follow-input-idle-delay' is used if non--nil,
   If none of these are found fallback to `helm-input-idle-delay'.")
 
+   (follow-delay-in-update
+    :initarg :follow-delay-in-update
+    :initform nil
+    :custom integer
+    :documentation
+    "  Same as `follow-delay' but only while updating source.")
+
    (multimatch
     :initarg :multimatch
     :initform t



reply via email to

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