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