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

Evil window selection should trigger ElDoc. #1044

Closed
wants to merge 3 commits into from

Conversation

hotpxl
Copy link
Contributor

@hotpxl hotpxl commented Apr 21, 2018

In evil-define-motion, especially this line, it will bind the command being defined to eldoc-add-command so that when this command is triggered, ElDoc will be triggered to redisplay documentation as well.

But the window selection commands (such as evil-window-up) are not "motion" and will not trigger ElDoc. So it's slightly annoying: after I switch to another window, and the cursor is now on top of something interesting, it will not show ElDoc documentation unless I move my cursor a bit.

This PR makes sure that window selection will trigger ElDoc message as well.

@wasamasa
Copy link
Member

Hm. I can see this being annoying and why you'd want this behavior. Judging from eldoc's sources, such a thing is done for window commands already, so what you've added is fine, too. However, I'm not 100% happy with putting it after the definition of window commands, perhaps evil-integration.el is better for this purpose.

@TheBB what do you think?

@TheBB
Copy link
Member

TheBB commented Apr 21, 2018

I agree, this is fine but it's more suitable for evil-integration.

@hotpxl
Copy link
Contributor Author

hotpxl commented Apr 21, 2018

Alright. I moved it to the end of the integration file.

@TheBB
Copy link
Member

TheBB commented Apr 22, 2018

Thanks, I squashed the commits for you.

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.

3 participants