;; 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))
(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))))