aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuri Linkov2023-05-19 21:14:16 +0300
committerJuri Linkov2023-05-19 21:14:16 +0300
commit42a28ffdc27498b66904c3d49e2f000a9b4690ca (patch)
tree4cb050f73d24d1213d4bfea8463737a0a5a27116
parent8e61d23f71e75225e1e48a572db76c2845a4201a (diff)
downloademacs-42a28ffdc27498b66904c3d49e2f000a9b4690ca.tar.gz
emacs-42a28ffdc27498b66904c3d49e2f000a9b4690ca.zip
* lisp/tab-bar.el: Don't use 'minibuffer-selected-window' (bug#62427).
(tab-bar-select-tab, tab-bar-new-tab-to): Use 'window-minibuffer-p' instead of 'minibuffer-selected-window'. And switch to 'get-mru-window' instead of 'minibuffer-selected-window'.
-rw-r--r--lisp/tab-bar.el12
1 files changed, 6 insertions, 6 deletions
diff --git a/lisp/tab-bar.el b/lisp/tab-bar.el
index 73f2ff77c50..dc9ea63c490 100644
--- a/lisp/tab-bar.el
+++ b/lisp/tab-bar.el
@@ -1319,8 +1319,8 @@ Negative TAB-NUMBER counts tabs from the end of the tab bar."
1319 1319
1320 (ws 1320 (ws
1321 ;; `window-state-put' fails when called in the minibuffer 1321 ;; `window-state-put' fails when called in the minibuffer
1322 (when (minibuffer-selected-window) 1322 (when (window-minibuffer-p)
1323 (select-window (minibuffer-selected-window))) 1323 (select-window (get-mru-window)))
1324 (window-state-put ws nil 'safe))) 1324 (window-state-put ws nil 'safe)))
1325 1325
1326 ;; Select the minibuffer when it was active before switching tabs 1326 ;; Select the minibuffer when it was active before switching tabs
@@ -1331,8 +1331,8 @@ Negative TAB-NUMBER counts tabs from the end of the tab bar."
1331 ;; another tab, then after going back to the first tab, it has 1331 ;; another tab, then after going back to the first tab, it has
1332 ;; such inconsistent state that the current buffer is the minibuffer, 1332 ;; such inconsistent state that the current buffer is the minibuffer,
1333 ;; but its window is not active. So try to undo this mess. 1333 ;; but its window is not active. So try to undo this mess.
1334 (when (and (minibufferp) (not (active-minibuffer-window))) 1334 (when (and (window-minibuffer-p) (not (active-minibuffer-window)))
1335 (other-window 1)) 1335 (select-window (get-mru-window)))
1336 1336
1337 (when tab-bar-history-mode 1337 (when tab-bar-history-mode
1338 (setq tab-bar-history-omit t)) 1338 (setq tab-bar-history-omit t))
@@ -1550,8 +1550,8 @@ After the tab is created, the hooks in
1550 1550
1551 (when tab-bar-new-tab-choice 1551 (when tab-bar-new-tab-choice
1552 ;; Handle the case when it's called in the active minibuffer. 1552 ;; Handle the case when it's called in the active minibuffer.
1553 (when (minibuffer-selected-window) 1553 (when (window-minibuffer-p)
1554 (select-window (minibuffer-selected-window))) 1554 (select-window (get-mru-window)))
1555 (let ((ignore-window-parameters t) 1555 (let ((ignore-window-parameters t)
1556 (window--sides-inhibit-check t)) 1556 (window--sides-inhibit-check t))
1557 (if (eq tab-bar-new-tab-choice 'clone) 1557 (if (eq tab-bar-new-tab-choice 'clone)