]> git.eshelyaron.com Git - emacs.git/commitdiff
Allow creating a new tab from the minibuffer (bug#45072)
authorJuri Linkov <juri@linkov.net>
Thu, 10 Dec 2020 08:28:32 +0000 (10:28 +0200)
committerJuri Linkov <juri@linkov.net>
Thu, 10 Dec 2020 08:28:32 +0000 (10:28 +0200)
* lisp/tab-bar.el (tab-bar-new-tab-to): Select the original window
when selected window is the minibuffer.

lisp/tab-bar.el

index 2604955224261993b17858b39817fd2a2b90241d..1327bde908880394207010be048473bfc1a0801a 100644 (file)
@@ -762,6 +762,8 @@ After the tab is created, the hooks in
          (from-tab (tab-bar--tab)))
 
     (when tab-bar-new-tab-choice
+      (when (minibuffer-selected-window)
+        (select-window (minibuffer-selected-window)))
       (delete-other-windows)
       ;; Create a new window to get rid of old window parameters
       ;; (e.g. prev/next buffers) of old window.