aboutsummaryrefslogtreecommitdiff
path: root/evil-repeat.el
diff options
context:
space:
mode:
authorWilliam G Hatch <william@hatch.uno>2017-06-26 16:01:27 -0600
committerAxel Forsman <axelsfor@gmail.com>2023-03-04 10:49:19 +0100
commite7f170fb1f08662b5a4165adc23d84858129e3ef (patch)
tree24fa28cc2b42a58f5731d3d419b85899c87aa54f /evil-repeat.el
parent96280419b46d43f5b7c33e3c655b62da69e0c671 (diff)
Advise read-key as well as read-key-sequence
Diffstat (limited to 'evil-repeat.el')
-rw-r--r--evil-repeat.el7
1 files changed, 6 insertions, 1 deletions
diff --git a/evil-repeat.el b/evil-repeat.el
index 73cd2da..a33d0e9 100644
--- a/evil-repeat.el
+++ b/evil-repeat.el
@@ -636,7 +636,7 @@ If COUNT is negative, this is a more recent kill."
(not evil-repeat-move-cursor)))
(evil-repeat-pop (- count) save-point))
-(defadvice read-key-sequence (before evil activate)
+(defun evil--read-key-sequence-advice ()
"Record `this-command-keys' before it is reset."
(when (and (evil-repeat-recording-p)
evil-recording-current-command)
@@ -644,6 +644,11 @@ If COUNT is negative, this is a more recent kill."
(if (functionp repeat-type)
(funcall repeat-type 'post)))))
+(defadvice read-key-sequence (before evil activate)
+ (evil--read-key-sequence-advice))
+(defadvice read-key-sequence-vector (before evil activate)
+ (evil--read-key-sequence-advice))
+
(provide 'evil-repeat)
;;; evil-repeat.el ends here