branch: externals/consult
commit 1a92fceb080d8f565771497172d1f1017fba5ec9
Author: Daniel Mendler <m...@daniel-mendler.de>
Commit: Daniel Mendler <m...@daniel-mendler.de>

    Add help echo to project names and abbreviate paths in prompt
---
 consult.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/consult.el b/consult.el
index 027610f1cf..6f685d1f72 100644
--- a/consult.el
+++ b/consult.el
@@ -718,7 +718,8 @@ The line beginning/ending BEG/END is bound in BODY."
   (save-match-data
     (let ((adir (abbreviate-file-name dir)))
       (if (string-match "/\\([^/]+\\)/\\([^/]+\\)/\\'" adir)
-          (format "…/%s/%s/" (match-string 1 adir) (match-string 2 adir))
+          (propertize (format "…/%s/%s/" (match-string 1 adir) (match-string 2 
adir))
+                      'help-echo adir)
         adir))))
 
 (defun consult--directory-prompt (prompt dir)
@@ -774,7 +775,7 @@ When no project is found and MAY-PROMPT is non-nil ask the 
user."
 (defun consult--project-name (dir)
   "Return the project name for DIR."
   (if (string-match "/\\([^/]+\\)/\\'" dir)
-      (match-string 1 dir)
+      (propertize (match-string 1 dir) 'help-echo dir)
     dir))
 
 (defun consult--format-file-line-match (file line &optional match)

Reply via email to