diff options
| author | Juri Linkov | 2020-04-29 02:49:44 +0300 |
|---|---|---|
| committer | Juri Linkov | 2020-04-29 02:49:44 +0300 |
| commit | 85544f8ef5dafee4425d011dc2067c3bca1305a6 (patch) | |
| tree | 5258c29561fe5e771f3fd73a77dd945046548bf7 | |
| parent | d83cc05a73645f23558590e0415ecb7d5ae2d02d (diff) | |
| download | emacs-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.el | 7 |
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. |
| 320 | When both this option and `isearch-lazy-highlight' are non-nil, | 320 | When both this option and `isearch-lazy-highlight' are non-nil, |
| 321 | show the current match number and the total number of matches | 321 | show the current match number and the total number of matches |
| 322 | in the buffer (or its restriction)." | 322 | in 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'. |