branch: master
commit d4ff6c5a29e33878e58d26b76ba5a2325f452896
Author: Evgeni Kolev <[email protected]>
Commit: Evgeni Kolev <[email protected]>
counsel.el (counsel-git-grep-recenter): fix warning by `recenter`
Without this fix, C-l (in counsel-git-grep-map) would print the warning:
`recenter'ing a window that does not display current-buffer.
---
counsel.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/counsel.el b/counsel.el
index bc8ec92..2b0d9db 100644
--- a/counsel.el
+++ b/counsel.el
@@ -1364,8 +1364,8 @@ When REVERT is non-nil, regenerate the current
*ivy-occur* buffer."
(defun counsel-git-grep-recenter ()
"Recenter window according to the selected candidate."
(interactive)
+ (counsel-git-grep-action (ivy-state-current ivy-last))
(with-ivy-window
- (counsel-git-grep-action (ivy-state-current ivy-last))
(recenter-top-bottom)))
;;** `counsel-git-stash'