diff --git a/doom-modeline-segments.el b/doom-modeline-segments.el index a832bfe9..357cb683 100644 --- a/doom-modeline-segments.el +++ b/doom-modeline-segments.el @@ -1547,10 +1547,10 @@ one. The ignored buffers are excluded unless `aw-ignore-on' is nil." ((and (memq doom-modeline-project-detection '(auto project)) (fboundp 'project-current)) (when-let* ((project (project-current))) - (project-name project))) - (t "")))) - (unless (string-empty-p name) - (format " [%s] " name)))))) + (project-name project)))))) + (if (and name (not (string-empty-p name))) + (format " [%s] " name) + ""))))) (doom-modeline-add-variable-watcher 'doom-modeline-project-detection