]> code.delx.au - gnu-emacs-elpa/commitdiff
Work correctly when no files in vc-dir buffer are marked
authorDmitry Gutov <dgutov@yandex.ru>
Wed, 11 Jul 2012 02:14:34 +0000 (06:14 +0400)
committerDmitry Gutov <dgutov@yandex.ru>
Wed, 11 Jul 2012 02:14:34 +0000 (06:14 +0400)
diff-hl.el

index 4e30059a5f1a67d37a340078b94171d55e0660b1..0f7956bddc6af66188e73bbffb5835e4529073b3 100644 (file)
@@ -281,7 +281,9 @@ in the source file, or the last line of the hunk above it."
     (diff-hl-remove-overlays)))\r
 \r
 (defun diff-hl-dir-update ()\r
-  (dolist (pair (vc-dir-marked-only-files-and-states))\r
+  (dolist (pair (if (vc-dir-marked-files)\r
+                    (vc-dir-marked-only-files-and-states)\r
+                  (vc-dir-child-files-and-states)))\r
     (when (eq 'up-to-date (cdr pair))\r
       (let ((buffer (find-buffer-visiting (car pair))))\r
         (when buffer\r