aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuri Linkov2020-04-29 02:49:44 +0300
committerJuri Linkov2020-04-29 02:49:44 +0300
commit85544f8ef5dafee4425d011dc2067c3bca1305a6 (patch)
tree5258c29561fe5e771f3fd73a77dd945046548bf7
parentd83cc05a73645f23558590e0415ecb7d5ae2d02d (diff)
downloademacs-85544f8ef5dafee4425d011dc2067c3bca1305a6.tar.gz
emacs-85544f8ef5dafee4425d011dc2067c3bca1305a6.zip
* 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)
-rw-r--r--lisp/isearch.el7
1 files changed, 5 insertions, 2 deletions
diff --git a/lisp/isearch.el b/lisp/isearch.el
index ddf9190dc6d..1a414830ee8 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -319,7 +319,7 @@ this variable is set to the symbol `all-windows'."
319 "Show match numbers in the search prompt. 319 "Show match numbers in the search prompt.
320When both this option and `isearch-lazy-highlight' are non-nil, 320When both this option and `isearch-lazy-highlight' are non-nil,
321show the current match number and the total number of matches 321show the current match number and the total number of matches
322in the buffer (or its restriction)." 322in the buffer (or its restriction), including all hidden matches."
323 :type 'boolean 323 :type 'boolean
324 :group 'lazy-count 324 :group 'lazy-count
325 :group 'isearch 325 :group 'isearch
@@ -3866,7 +3866,10 @@ Attempt to do the search exactly the way the pending Isearch would."
3866 (isearch-regexp-lax-whitespace 3866 (isearch-regexp-lax-whitespace
3867 isearch-lazy-highlight-regexp-lax-whitespace) 3867 isearch-lazy-highlight-regexp-lax-whitespace)
3868 (isearch-forward isearch-lazy-highlight-forward) 3868 (isearch-forward isearch-lazy-highlight-forward)
3869 (search-invisible nil) ; don't match invisible text 3869 ;; Don't match invisible text unless it can be opened
3870 ;; or when counting matches and user can visit hidden matches
3871 (search-invisible (or (eq search-invisible 'open)
3872 (and isearch-lazy-count search-invisible)))
3870 (retry t) 3873 (retry t)
3871 (success nil)) 3874 (success nil))
3872 ;; Use a loop like in `isearch-search'. 3875 ;; Use a loop like in `isearch-search'.