emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

emacs-27 85544f8: * lisp/isearch.el: Fix lazy-highlighting and lazy-coun


From: Juri Linkov
Subject: emacs-27 85544f8: * lisp/isearch.el: Fix lazy-highlighting and lazy-counting of hidden matches
Date: Tue, 28 Apr 2020 19:49:51 -0400 (EDT)

branch: emacs-27
commit 85544f8ef5dafee4425d011dc2067c3bca1305a6
Author: Juri Linkov <address@hidden>
Commit: Juri Linkov <address@hidden>

    * lisp/isearch.el: Fix lazy-highlighting and lazy-counting of hidden matches
    
    * lisp/isearch.el (isearch-lazy-highlight-search): Let-bind
    search-invisible to t when search-invisible is 'open' or when both
    isearch-lazy-count and search-invisible are non-nil.  (Bug#40808)
---
 lisp/isearch.el | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/lisp/isearch.el b/lisp/isearch.el
index ddf9190..1a41483 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -319,7 +319,7 @@ this variable is set to the symbol `all-windows'."
   "Show match numbers in the search prompt.
 When both this option and `isearch-lazy-highlight' are non-nil,
 show the current match number and the total number of matches
-in the buffer (or its restriction)."
+in the buffer (or its restriction), including all hidden matches."
   :type 'boolean
   :group 'lazy-count
   :group 'isearch
@@ -3866,7 +3866,10 @@ Attempt to do the search exactly the way the pending 
Isearch would."
            (isearch-regexp-lax-whitespace
             isearch-lazy-highlight-regexp-lax-whitespace)
            (isearch-forward isearch-lazy-highlight-forward)
-           (search-invisible nil)      ; don't match invisible text
+           ;; Don't match invisible text unless it can be opened
+           ;; or when counting matches and user can visit hidden matches
+           (search-invisible (or (eq search-invisible 'open)
+                                 (and isearch-lazy-count search-invisible)))
            (retry t)
            (success nil))
        ;; Use a loop like in `isearch-search'.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]