From 8dc030e114394a719b094f9521e6f35f6b484e14 Mon Sep 17 00:00:00 2001 From: Benson Chu Date: Fri, 28 Oct 2022 16:30:26 -0500 Subject: [PATCH] Indentation --- lisp/switch-tabs.el | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/lisp/switch-tabs.el b/lisp/switch-tabs.el index 324a3f2..a3d6461 100644 --- a/lisp/switch-tabs.el +++ b/lisp/switch-tabs.el @@ -44,17 +44,19 @@ (defun switch-or-create-tab (tab-name) (interactive (list (my/read-tab-name))) - (let ((tab-index (tab-bar--tab-index-by-name tab-name))) - (if tab-index - (progn - (cl-incf tab-index) - (tab-bar-select-tab tab-index) - tab-index) - (let* ((spec (member tab-name switch-tabs/special-tabs)) - (tab-bar-new-tab-to (if spec 'leftmost 'rightmost))) - (tab-bar-new-tab)) - (tab-bar-rename-tab tab-name) - (tab-bar--current-tab-index)))) + (if (active-minibuffer-window) + (message "Minibuffer still active. Close before switching tabs... ") + (let ((tab-index (tab-bar--tab-index-by-name tab-name))) + (if tab-index + (progn + (cl-incf tab-index) + (tab-bar-select-tab tab-index) + tab-index) + (let* ((spec (member tab-name switch-tabs/special-tabs)) + (tab-bar-new-tab-to (if spec 'leftmost 'rightmost))) + (tab-bar-new-tab)) + (tab-bar-rename-tab tab-name) + (tab-bar--current-tab-index))))) (defun last-tab () (interactive)