From 5eafc0a7a910db0accac162a59f4709fc2ecec4c Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Tue, 1 Dec 2015 01:38:15 +0200 Subject: [PATCH] * lisp/replace.el (occur-engine): Count matches in empty lines. (Bug#22062) --- lisp/replace.el | 3 +++ 1 file changed, 3 insertions(+) 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)) -- 2.39.5