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

Fix support for universal arguments. #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Fix support for universal arguments. #7

wants to merge 1 commit into from

Conversation

fishyfriend
Copy link

@fishyfriend fishyfriend commented Apr 4, 2020

Fix for issue #5

This PR fixes the following issue: if I temporarily enter God state using evil-execute-in-god-state then type a key bound to a prefix argument function (such as digit-argument), God state exits immediately. The prefix argument is duly recorded but I can't enter the rest of the command in God state.

The problem is the existing checks for prefix arguments ((eq this-command #'digit-argument) etc.) were never evaluating to true because the prefix argument commands set the value of this-command to the value of last-command. So in a post-command hook we can't ever know via this-command whether a prefix argument has been applied.

This behavior of the prefix arg commands also points the way to a solution: since they also set real-this-command to the value of real-last-command, we can use real-this-command to know definitively whether evil-execute-in-god-state was the last command run other than a prefix arg command, which was the intent of the original checks.

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.

1 participant