branch: elpa/helm
commit 58f25ef0e8ec9eb5a2647ce687a77b6ebadb2852
Author: Thierry Volpiatto <[email protected]>
Commit: Thierry Volpiatto <[email protected]>

    Reenable erase-buffer when no sources to update
    
    in helm-update.  Otherwise the helm buffer is not erased with for
    example helm-occur and delete quickly chars backward in minibuffer.
---
 helm-core.el | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/helm-core.el b/helm-core.el
index a2aa43ac44..1b03b70e9b 100644
--- a/helm-core.el
+++ b/helm-core.el
@@ -5067,14 +5067,14 @@ without recomputing them, it should be a list of lists."
                 (cl-loop for src in helm-sources
                          when (helm-update-source-p src)
                          collect src))
-          ;; When no sources to update erase buffer
-          ;; to avoid duplication of header and candidates
-          ;; when next chunk of update will arrive,
-          ;; otherwise the buffer is erased AFTER [1] the results
-          ;; are computed.
-          ;; FIXME the explanation above is probably obsolete.
-          ;;(unless sources (erase-buffer))
-          
+          ;; When no sources to update erase buffer to avoid duplication of
+          ;; header and candidates when next chunk of update will arrive,
+          ;; otherwise the buffer is erased AFTER [1] the results are
+          ;; computed. This is also needed when pattern is quickly deleted
+          ;; backward and we reach requires-pattern limit, in this case the 
helm
+          ;; buffer is not updated and stays with the results of the last
+          ;; matching pattern.
+          (unless sources (erase-buffer))
           ;; Compute matches without rendering the sources.
           ;; This prevent the helm-buffer flickering when constantly
           ;; updating.

Reply via email to