changeset 88003:fa9ef03eaf25

(wdired-get-filename): Change `(1+ beg)' to `beg' so that the filename end is found even when the filename is empty. Fixes error and spurious newlines when marking files for deletion.
author Martin Rudalics <rudalics@gmx.at>
date Sat, 26 Jan 2008 17:23:25 +0000
parents fbe991fb6726
children fc19a7a0c967
files lisp/wdired.el
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/wdired.el	Sat Jan 26 17:07:59 2008 +0000
+++ b/lisp/wdired.el	Sat Jan 26 17:23:25 2008 +0000
@@ -323,7 +323,11 @@
       (unless (eq beg end)
 	(if old
 	    (setq file (get-text-property beg 'old-name))
-	  (setq end (next-single-property-change (1+ beg) 'end-name))
+	  ;; In the following form changed `(1+ beg)' to `beg' so that
+	  ;; the filename end is found even when the filename is empty.
+	  ;; Fixes error and spurious newlines when marking files for
+	  ;; deletion.
+	  (setq end (next-single-property-change beg 'end-name))
 	  (setq file (buffer-substring-no-properties (1+ beg) end)))
 	(and file (setq file (wdired-normalize-filename file))))
       (if (or no-dir old)