From 549536ca057243e1b77718d3ef9df4ce052ac7fc Mon Sep 17 00:00:00 2001 From: BirDt_ Date: Thu, 21 Aug 2025 17:01:00 +0800 Subject: [PATCH] nil handling --- userland/projects.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/userland/projects.el b/userland/projects.el index f2a4d52..124a9f0 100644 --- a/userland/projects.el +++ b/userland/projects.el @@ -55,7 +55,7 @@ (defun theurgy-swap-to-tab-project () "Go to the project dir of the tab group." (let ((tab-group-name (tab-bar-tab-group-default (tab-bar--current-tab)))) - (when (string-match-p "^project:" tab-group-name) + (when (and tab-group-name (string-match-p "^project:" tab-group-name)) (neotree-dir (string-remove-prefix "project: " tab-group-name))))) (add-hook 'tab-bar-select-tab-hook #'theurgy-swap-to-tab-project)