]> code.delx.au - gnu-emacs/commitdiff
* lisp/replace.el (occur-engine): Count matches in empty lines.
authorJuri Linkov <juri@linkov.net>
Mon, 30 Nov 2015 23:38:15 +0000 (01:38 +0200)
committerJuri Linkov <juri@linkov.net>
Mon, 30 Nov 2015 23:38:15 +0000 (01:38 +0200)
(Bug#22062)

lisp/replace.el

index 21a830da9caf30ed7bd2a76911219da6a7de6d9e..54b3a71bda29e0ba820e0e59d8f223abd0738a2d 100644 (file)
@@ -1577,6 +1577,9 @@ See also `multi-occur'."
                    ;; Highlight the matches
                    (let ((len (length curstring))
                          (start 0))
+                     ;; Count empty lines that don't use next loop (Bug#22062).
+                     (when (zerop len)
+                       (setq matches (1+ matches)))
                      (while (and (< start len)
                                  (string-match regexp curstring start))
                        (setq matches (1+ matches))