changeset 79929:9f02d20a167c

(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:17:52 +0000
parents a6bebc02888e
children 54e3bf0e1bbe
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:00:52 2008 +0000
+++ b/lisp/wdired.el	Sat Jan 26 17:17:52 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)