]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix 'repeat-check-map'
authorEshel Yaron <me@eshelyaron.com>
Wed, 26 Jun 2024 20:09:16 +0000 (22:09 +0200)
committerEshel Yaron <me@eshelyaron.com>
Wed, 26 Jun 2024 20:09:16 +0000 (22:09 +0200)
lisp/repeat.el

index 9d54ea542e4c803c945484a12b0b5e6efee4956c..c2ea24c2dbbd60a1ce65f90c4f1946650cfe882b 100644 (file)
@@ -479,7 +479,9 @@ See `describe-repeat-maps' for a list of all repeatable commands."
        ;; in the same minibuffer, but not when the minibuffer is activated
        ;; in the middle of repeating sequence (bug#47566).
        (or (< (minibuffer-depth) (car repeat--prev-mb))
-           (eq current-minibuffer-command (cdr repeat--prev-mb)))
+           (eq (when-let ((win (active-minibuffer-window)))
+                 (window-buffer win))
+               (cdr repeat--prev-mb)))
        (repeat-check-key last-command-event map)
        t))
 
@@ -526,7 +528,10 @@ See `describe-repeat-maps' for a list of all repeatable commands."
                     (run-with-idle-timer timeout nil #'repeat-exit)))))))
 
     (setq repeat-map nil)
-    (setq repeat--prev-mb (cons (minibuffer-depth) current-minibuffer-command))
+    (setq repeat--prev-mb
+          (cons (minibuffer-depth)
+                (when-let ((win (active-minibuffer-window)))
+                  (window-buffer win))))
     (when (and was-in-progress (not repeat-in-progress))
       (repeat-exit))))