Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

counsel.el (counsel-git-grep-recenter): fix warning by recenter #1097

Merged
merged 1 commit into from
Jul 5, 2017

Conversation

edkolev
Copy link
Contributor

@edkolev edkolev commented Jul 5, 2017

Without this fix, C-l (in counsel-git-grep-map) would print the warning:
`recenter'ing a window that does not display current-buffer.

Without this fix, C-l (in counsel-git-grep-map) would print the warning:
`recenter'ing a window that does not display current-buffer.
@edkolev
Copy link
Contributor Author

edkolev commented Jul 5, 2017

I had the following issue:

  • run counsel-git-grep
  • C-l on a grep result of a file not displayed in a buffer
  • the window correctly switches to a fresh buffer and recenters, however, the following error is displayed recenter'ing a window that does not display current-buffer. (printed by emacs' window.c)

This PR moves counsel-git-grep-action out of the with-ivy-window macro (counsel-git-grep-action calls itself this macro) and leaves recenter-top-bottom the sole function called in ivy-with-window -- with this change the warning from window.c isn't displayed

@abo-abo abo-abo merged commit d4ff6c5 into abo-abo:master Jul 5, 2017
@abo-abo
Copy link
Owner

abo-abo commented Jul 5, 2017

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants