diff --git a/test/whale-line-segments-test.el b/test/whale-line-segments-test.el index 9da3736..ce45c08 100644 --- a/test/whale-line-segments-test.el +++ b/test/whale-line-segments-test.el @@ -708,9 +708,10 @@ (ert-deftest project--help () (bydi ((:always project-current) + (:mock project-name :return "Test") (:mock project-root :return "/home/test/project/")) - (should (string= "Project (/home/test/project/)\nmouse-1: Open root" (whale-line-segments--project--help))))) + (should (string= "Project Test (/home/test/project/)\nmouse-1: Open root" (whale-line-segments--project--help))))) (ert-deftest project--get--for-project () (let ((whale-line-segments--project--map nil) diff --git a/whale-line-segments.el b/whale-line-segments.el index b2cb37b..78052fa 100644 --- a/whale-line-segments.el +++ b/whale-line-segments.el @@ -888,9 +888,10 @@ Only consider Dired buffers and file buffers." (defun whale-line-segments--project--help () "Get the help text for the project." (when-let* ((project (project-current)) + (name (project-name project)) (root (project-root project))) - (format "Project (%s)\nmouse-1: Open root" root))) + (format "Project %s (%s)\nmouse-1: Open root" name root))) (defun whale-line-segments--project () "Get the project segment."