summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorWolfgang Scherer <Wolfgang.Scherer@gmx.de>2020-02-12 00:24:24 +0200
committerDmitry Gutov <dgutov@yandex.ru>2020-02-12 00:29:40 +0200
commit2b12c2b6f22187536f54f32b11589bf5f21c1f09 (patch)
treea0f0b09eb658f6dc0a6fe1a5c58ee013cd21bd61 /lisp
parentff4ed4a0ff5929d5ea81a0590ac1a4ca8dfc31ce (diff)
downloademacs-2b12c2b6f22187536f54f32b11589bf5f21c1f09.tar.gz
Make sure not to mark directories
* lisp/vc/vc-dir.el (vc-dir-mark-all-files): Make sure not to mark directories (bug#37182).
Diffstat (limited to 'lisp')
-rw-r--r--lisp/vc/vc-dir.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/vc/vc-dir.el b/lisp/vc/vc-dir.el
index 0c293526eda..033cb27e33e 100644
--- a/lisp/vc/vc-dir.el
+++ b/lisp/vc/vc-dir.el
@@ -649,7 +649,7 @@ line."
(defun vc-dir-mark-all-files (arg)
"Mark all files with the same state as the current one.
-With a prefix argument mark all files.
+With a prefix argument mark all files (not directories).
If the current entry is a directory, mark all child files.
The commands operate on files that are on the same state.
@@ -670,7 +670,8 @@ share the same state."
vc-ewoc)
(ewoc-map
(lambda (filearg)
- (unless (vc-dir-fileinfo->marked filearg)
+ (unless (or (vc-dir-fileinfo->directory filearg)
+ (vc-dir-fileinfo->marked filearg))
(setf (vc-dir-fileinfo->marked filearg) t)
t))
vc-ewoc))