Permalink
Browse files

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

  • Loading branch information...
pft committed Jan 16, 2010
1 parent 96f05c5 commit 821d1dd66581eeb82cdfbf83072e69a8d2bb199d
Showing with 5 additions and 1 deletion.
  1. +5 −1 disk-usage.el
View
@@ -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)

0 comments on commit 821d1dd

Please sign in to comment.