From bfb79e66e007a8dfb5f8099fe47beb0d1861c6df Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Fri, 15 Jan 2021 01:29:06 +0000 Subject: [PATCH] chore(workspaces): improve tab-bar list display function --- modules/workspaces/siren-tab-bar.el | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/modules/workspaces/siren-tab-bar.el b/modules/workspaces/siren-tab-bar.el index aa4f5fd..4099668 100644 --- a/modules/workspaces/siren-tab-bar.el +++ b/modules/workspaces/siren-tab-bar.el @@ -140,21 +140,20 @@ ARG counts from 1." (interactive) (let* ((tabs (funcall tab-bar-tabs-function)) (current-index (or (tab-bar--current-tab-index tabs) 0)) - (output "") + (output '()) (index 0)) (dolist (tab tabs) - (setq output - (concat output - (propertize (format "%d:" index) - 'face 'siren-tab-bar-echo-index) - (propertize (alist-get 'name tab) - 'face (if (eq index current-index) - 'siren-tab-bar-echo-current - 'siren-tab-bar-echo-default)) - " ") - index (1+ index))) + (add-to-list 'output + (concat (propertize (format "%d:" index) + 'face 'siren-tab-bar-echo-index) + (propertize (alist-get 'name tab) + 'face (if (eq index current-index) + 'siren-tab-bar-echo-current + 'siren-tab-bar-echo-default))) + t) + (setq index (1+ index))) - (message "tabs: %s" output))) + (message "tabs: %s" (string-join output " ")))) (defun siren-tab-bar-echo-tab-list-advice (&rest _) (when siren-tab-bar-echo-tab-list