branch: externals/disk-usage
commit 2d36a87eca2bb2015a37298ca497f1fa995d70fc
Author: Pierre Neidhardt <[email protected]>
Commit: Pierre Neidhardt <[email protected]>
Fix disk-usage--path-at-point to return directory
It's now resilient to column change.
---
disk-usage.el | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/disk-usage.el b/disk-usage.el
index 2822127..cc69541 100644
--- a/disk-usage.el
+++ b/disk-usage.el
@@ -402,11 +402,8 @@ Also see `disk-usage-by-types-mode'."
;; FIXME: The GNU convention is to use "path" only for lists of directories
;; as in `load-path' and $PATH and to use "file name" for what you here call
;; "path". --Stef
- (let* ((entry (tabulated-list-get-entry (point)))
- (path (aref entry 1)))
- (if (listp path)
- (setq path (cl-first path))
- path)))
+ (let ((file-info (tabulated-list-get-id (point))))
+ (disk-usage--file-info-name file-info)))
(defun disk-usage--directory-at-point ()
(let ((path (disk-usage--path-at-point)))