diff --git a/lisp/switch-tabs.el b/lisp/switch-tabs.el index 5378347..8f27523 100644 --- a/lisp/switch-tabs.el +++ b/lisp/switch-tabs.el @@ -48,7 +48,8 @@ (when (y-or-n-p (format "Close tab \"%s\"? " old-name)) (tab-bar-close-tab) - (switch-or-create-tab)))) + (when (<= 2 (length (funcall tab-bar-tabs-function))) + (switch-or-create-tab))))) (defun tab-bar-report () (interactive)