evil-god-state icon indicating copy to clipboard operation
evil-god-state copied to clipboard

Fix support for universal arguments.

Open fishyfriend opened this issue 5 years ago • 0 comments

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.

fishyfriend avatar Apr 04 '20 00:04 fishyfriend