Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

When du-dired is called at a file, put point at the files line in Dired

  • Loading branch information...
commit 821d1dd66581eeb82cdfbf83072e69a8d2bb199d 1 parent 96f05c5
@pft authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 disk-usage.el
View
6 disk-usage.el
@@ -289,7 +289,11 @@ See man(du) for explanation of those arguments"
(dired
(if (file-directory-p file-or-dir)
file-or-dir
- (file-name-directory file-or-dir)))))
+ (file-name-directory file-or-dir)))
+ (when (not (file-directory-p file-or-dir))
+ (goto-char (point-min))
+ (search-forward (file-name-nondirectory file-or-dir))
+ (goto-char (match-beginning 0)))))
(defun du-empty-buffer-p ()
(= (point-min)
Please sign in to comment.
Something went wrong with that request. Please try again.