branch: master
commit fe93cc6f68a07c81b61a3ff929b3b3b97e44ff2a
Author: Oleh Krehel <[email protected]>
Commit: Oleh Krehel <[email protected]>

    counsel.el (counsel-M-x): Fix interaction with repeat
    
    Need to set `real-this-command' in order for `repeat' to work.
    
    Fixes #564
---
 counsel.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/counsel.el b/counsel.el
index 9bfaa08..0e91741 100644
--- a/counsel.el
+++ b/counsel.el
@@ -675,8 +675,9 @@ Optional INITIAL-INPUT is the initial input in the 
minibuffer."
               (lambda (cmd)
                 (when (featurep 'smex)
                   (smex-rank (intern cmd)))
-                (let ((prefix-arg current-prefix-arg)
-                      (this-command (intern cmd)))
+                (let ((prefix-arg current-prefix-arg))
+                  (setq real-this-command
+                        (setq this-command (intern cmd)))
                   (command-execute (intern cmd) 'record)))
               :sort sort
               :keymap counsel-describe-map

Reply via email to