From 022e1d2db7a90a51ca804ad67c6d3977527f9cc9 Mon Sep 17 00:00:00 2001 From: Eshel Yaron Date: Wed, 26 Jun 2024 22:09:16 +0200 Subject: [PATCH] Fix 'repeat-check-map' --- lisp/repeat.el | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lisp/repeat.el b/lisp/repeat.el index 9d54ea542e4..c2ea24c2dbb 100644 --- a/lisp/repeat.el +++ b/lisp/repeat.el @@ -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)))) -- 2.39.2