summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/tab-bar.el16
1 files changed, 5 insertions, 11 deletions
diff --git a/lisp/tab-bar.el b/lisp/tab-bar.el
index 1327bde9088..3a705aa015d 100644
--- a/lisp/tab-bar.el
+++ b/lisp/tab-bar.el
@@ -762,6 +762,7 @@ After the tab is created, the hooks in
(from-tab (tab-bar--tab)))
(when tab-bar-new-tab-choice
+ ;; Handle the case when it's called in the active minibuffer.
(when (minibuffer-selected-window)
(select-window (minibuffer-selected-window)))
(delete-other-windows)
@@ -1200,18 +1201,11 @@ Type q to remove the list of window configurations from the display.
The first column shows `D' for a window configuration you have
marked for deletion."
(interactive)
- (let ((dir default-directory)
- (minibuf (minibuffer-selected-window)))
- (let ((tab-bar-show nil)) ; don't enable tab-bar-mode if it's disabled
+ (let ((dir default-directory))
+ (let ((tab-bar-new-tab-choice t)
+ ;; Don't enable tab-bar-mode if it's disabled
+ (tab-bar-show nil))
(tab-bar-new-tab))
- ;; Handle the case when it's called in the active minibuffer.
- (when minibuf (select-window (minibuffer-selected-window)))
- (delete-other-windows)
- ;; Create a new window to replace the existing one, to not break the
- ;; window parameters (e.g. prev/next buffers) of the window just saved
- ;; to the window configuration. So when a saved window is restored,
- ;; its parameters left intact.
- (split-window) (delete-window)
(let ((switch-to-buffer-preserve-window-point nil))
(switch-to-buffer (tab-switcher-noselect)))
(setq default-directory dir))