branch: elpa/helm
commit 8888deac013cc6441c661710f1b0b72f7f47d2e1
Author: Thierry Volpiatto <thie...@posteo.net>
Commit: Thierry Volpiatto <thie...@posteo.net>

    Fallback to current-buffer in helm-multi-occur-1
    
    This is needed when the function is not called from Helm and Helm has
    not already started, this trigger an error because helm-current-buffer
    is nil at this point and get-buffer fails.
---
 helm-occur.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/helm-occur.el b/helm-occur.el
index 0f3e42e0cf..fc1486a3e7 100644
--- a/helm-occur.el
+++ b/helm-occur.el
@@ -414,7 +414,7 @@ helm-occur will start immediately with DEFAULT as INPUT.
 Always prefer using DEFAULT instead of INPUT, they have the same effect but
 DEFAULT keep the minibuffer empty, allowing the user to write immediately
 without having to delete its contents before."
-  (let* ((curbuf (get-buffer helm-current-buffer))
+  (let* ((curbuf (get-buffer (or helm-current-buffer (current-buffer))))
          (bufs (if (or helm-occur-always-search-in-current
                        (memql curbuf buffers))
                    (cons curbuf (remove curbuf buffers))

Reply via email to