Call ivy-switch-buffer with "C-x C-b", call ivy-dispatching-done with "M-o". The hydra is then:
Select action "n", to "do nothing". Now call ivy-resume with "C-c C-r", and then again ivy-dispatching-done with "M-o". As shown, the new action is set as the default action, in this case. Hitting "n" works, and hitting "o" will perform "do nothing".
I’m not really sure this is not expected behavior. I can indeed rationalize it as ivy-resume also "resuming" the last action, similar to ivy-dispatching-call. But, the same behavior does not occur when ivy-hydra is not in use. In this case, calling "do nothing", then ivy-resume and then calling "M-o o" will switch to the selected buffer, and not "do nothing". So, this behavior might be unexpected, thus the report. If it is expected, just close this.
Note: I wrote this assuming the effect resulted from my custom action. Further testing showed me it also happens for the default actions in ivy-switch-buffer (I haven’t tested, but possibly in other ivy commands). But the replication steps are already circumscribed enough for you to isolate the described behavior, I think.
@abo-abo Let me check one thing with you about this issue. I was not sure about what the expected behavior was for ivy-resume regarding the default action. (I didn't find anything explicit in the docs, but I might well have missed it). However, the resolution you gave here suggests the default action should not be restored when calling ivy-resume.
If this presumption is correct, this is working fine, as reported, for ivy-dispatching-done, with or without ivy-hydra.
However, the behavior of ivy-done ("RET") still uses a changed default action, when calling ivy-resume. So that when calling ivy-resume "RET" behaves different from "M-o o". Is this expected? If not, would you prefer I extend the report here, or open a new issue?
I see. It does make sense indeed. Considering this the main envisaged use case, I get including why ivy-done keeps the previous action after ivy-resume while ivy-dispatching-done does not, the latter being equivalent of the behavior of ivy-dispatching-call for which the current action reverts to the default one after it's called. Thank you for considering and answering. Cheers!