branch: elpa/helm
commit fd7e458dc16d1c125f42719bbd49af6924fc3358
Author: Thierry Volpiatto <[email protected]>
Commit: Thierry Volpiatto <[email protected]>
Fix helm-grep-mode--sentinel when reverting helm-grep-mode buffer
from somewhere else.
---
helm-grep.el | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/helm-grep.el b/helm-grep.el
index f1d82bf47a..958e057daf 100644
--- a/helm-grep.el
+++ b/helm-grep.el
@@ -921,7 +921,9 @@ Special commands:
(defun helm-grep-mode--sentinel (process event)
(when (string= event "finished\n")
- (with-current-buffer (current-buffer)
+ (with-current-buffer (if (eq major-mode 'helm-grep-mode)
+ (current-buffer)
+ (next-error-find-buffer))
(let ((inhibit-read-only t))
(save-excursion
(cl-loop for l in (with-current-buffer (process-buffer process)