diff options
author | Juri Linkov <juri@linkov.net> | 2023-05-16 20:32:34 +0300 |
---|---|---|
committer | Juri Linkov <juri@linkov.net> | 2023-05-16 20:32:34 +0300 |
commit | a8f2009d03138b3b3b6c75452aba7a17c68a60f7 (patch) | |
tree | 11a1723af49497d428535008e5e14cbc3bddfc7a | |
parent | 2b1e81df06dcca5212dd4887ea09db0544f6e11b (diff) | |
download | emacs-a8f2009d03138b3b3b6c75452aba7a17c68a60f7.tar.gz |
* lisp/windmove.el (windmove-swap-states-in-direction): Don't swap minibuffer.
Guard against swapping the minibuffer when the minibuffer is in the selected
window (bug#62427). The function was already protected when the minibuffer
is in other-window.
-rw-r--r-- | lisp/windmove.el | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lisp/windmove.el b/lisp/windmove.el index 06ce16c0d42..746a440bacb 100644 --- a/lisp/windmove.el +++ b/lisp/windmove.el @@ -724,6 +724,8 @@ from the opposite side of the frame." nil windmove-wrap-around 'nomini))) (cond ((or (null other-window) (window-minibuffer-p other-window)) (user-error "No window %s from selected window" dir)) + ((window-minibuffer-p (selected-window)) + (user-error "Can't swap window with the minibuffer")) (t (window-swap-states nil other-window))))) |