I started using ryo-modal recently and it's a great package.
This pull request changes the behavior of ryo-modal-repeat when previous command is applied with prefix argument.
Before the change, ryo-modal-repeat will call previous command but discards the prefix argument. This makes the result surprising sometimes. E.g., if we set (ryo-modal-keys ("k" kill-line)), then C-u-1k (which kills lines backwards), then ryo-modal-repeat, we would expect that it continues to kill lines backwards. But since the prefix argument is discarded, the result is "Kill the rest of the current line".
The patch fixes that by remembering the prefix argument by ryo-modal--last-command-prefix-arg
It works fine for me. I think it's reasonable to make it the default behavior. But if you have other considerations, maybe consider adding something like (defcustom ryo-modal--remember-last-command-prefix-arg nil)?
Hi,
I started using ryo-modal recently and it's a great package.
This pull request changes the behavior of
ryo-modal-repeat
when previous command is applied with prefix argument.Before the change, ryo-modal-repeat will call previous command but discards the prefix argument. This makes the result surprising sometimes. E.g., if we set
(ryo-modal-keys ("k" kill-line))
, thenC-u
-1
k
(which kills lines backwards), thenryo-modal-repeat
, we would expect that it continues to kill lines backwards. But since the prefix argument is discarded, the result is "Kill the rest of the current line".The patch fixes that by remembering the prefix argument by
ryo-modal--last-command-prefix-arg
It works fine for me. I think it's reasonable to make it the default behavior. But if you have other considerations, maybe consider adding something like
(defcustom ryo-modal--remember-last-command-prefix-arg nil)
?It's great to be able to hear back from you.
Thanks!