diff options
| author | Juri Linkov | 2015-12-01 01:38:15 +0200 |
|---|---|---|
| committer | Juri Linkov | 2015-12-01 01:38:15 +0200 |
| commit | 5eafc0a7a910db0accac162a59f4709fc2ecec4c (patch) | |
| tree | 439972d0253160fbe8bc254948ddaaceba79e281 /lisp/replace.el | |
| parent | 7210f5130abb909aebcbb09a8a71558100fb9f96 (diff) | |
| download | emacs-5eafc0a7a910db0accac162a59f4709fc2ecec4c.tar.gz emacs-5eafc0a7a910db0accac162a59f4709fc2ecec4c.zip | |
* lisp/replace.el (occur-engine): Count matches in empty lines.
(Bug#22062)
Diffstat (limited to 'lisp/replace.el')
| -rw-r--r-- | lisp/replace.el | 3 |
1 files changed, 3 insertions, 0 deletions
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'." | |||
| 1577 | ;; Highlight the matches | 1577 | ;; Highlight the matches |
| 1578 | (let ((len (length curstring)) | 1578 | (let ((len (length curstring)) |
| 1579 | (start 0)) | 1579 | (start 0)) |
| 1580 | ;; Count empty lines that don't use next loop (Bug#22062). | ||
| 1581 | (when (zerop len) | ||
| 1582 | (setq matches (1+ matches))) | ||
| 1580 | (while (and (< start len) | 1583 | (while (and (< start len) |
| 1581 | (string-match regexp curstring start)) | 1584 | (string-match regexp curstring start)) |
| 1582 | (setq matches (1+ matches)) | 1585 | (setq matches (1+ matches)) |