emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/dirvish 77e0ca2f0b: fix(core): make `dirvish--render-attrs


From: ELPA Syncer
Subject: [nongnu] elpa/dirvish 77e0ca2f0b: fix(core): make `dirvish--render-attrs` recognize symlink (#305)
Date: Sun, 2 Mar 2025 13:01:19 -0500 (EST)

branch: elpa/dirvish
commit 77e0ca2f0bf31a1527622bbf8b81c3eb57c8d468
Author: Alex Lu <hellosimon1103@hotmail.com>
Commit: Alex Lu <hellosimon1103@hotmail.com>

    fix(core): make `dirvish--render-attrs` recognize symlink (#305)
---
 dirvish.el | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/dirvish.el b/dirvish.el
index b442df7c3b..0a5f721bb5 100644
--- a/dirvish.el
+++ b/dirvish.el
@@ -991,7 +991,12 @@ When PROC finishes, fill preview buffer with process 
result."
                         (unless remote (file-attributes f-name)))
               f-type (dirvish-attribute-cache f-name :type
                        (let ((ch (progn (back-to-indentation) (char-after))))
-                         `(,(if (eq ch 100) 'dir 'file) . nil))))
+                         (cond ; ASCII: d -> 100, l -> 108
+                          ((eq ch 100) '(dir . nil))
+                          ((eq ch 108) ; use slash for dir check is unreliable
+                           `(,(if (file-directory-p f-name) 'dir 'file) .
+                             ,(buffer-substring (+ f-end 4) l-end)))
+                          (t '(file . nil))))))
         (unless (get-text-property f-beg 'mouse-face)
           (dired-insert-set-properties l-beg l-end)))
       (cl-loop



reply via email to

[Prev in Thread] Current Thread [Next in Thread]