From: Juri Linkov Date: Mon, 30 Nov 2015 23:38:15 +0000 (+0200) Subject: * lisp/replace.el (occur-engine): Count matches in empty lines. X-Git-Tag: emacs-25.0.90~576 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=5eafc0a7a910db0accac162a59f4709fc2ecec4c;p=emacs.git * lisp/replace.el (occur-engine): Count matches in empty lines. (Bug#22062) --- diff --git a/lisp/replace.el b/lisp/replace.el index 21a830da9ca..54b3a71bda2 100644 --- a/lisp/replace.el +++ b/lisp/replace.el @@ -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))