Mercurial > emacs
changeset 49817:6455c268ddb1
(insert-directory): Add workaround for the case that we
can't trust ls's output as to byte positions of filenames.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Mon, 17 Feb 2003 06:18:32 +0000 |
parents | bc226af8acd5 |
children | 5ace3220d804 |
files | lisp/files.el |
diffstat | 1 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/files.el Mon Feb 17 00:33:01 2003 +0000 +++ b/lisp/files.el Mon Feb 17 06:18:32 2003 +0000 @@ -4110,7 +4110,12 @@ (while (< (point) end) (let ((start (+ beg (read (current-buffer)))) (end (+ beg (read (current-buffer))))) - (put-text-property start end 'dired-filename t))) + (if (= (char-after end) ?\n) + (put-text-property start end 'dired-filename t) + ;; It seems that we can't trust ls's output as to + ;; byte positions of filenames. + (put-text-property beg (point) 'dired-filename nil) + (end-of-line)))) (goto-char end) (beginning-of-line) (delete-region (point) (progn (forward-line 2) (point)))))