From f247fa5d5ce7cb34f23c979c17b14c5713eb5490 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Sat, 4 Dec 2021 22:04:37 +0200 Subject: [PATCH] * lisp/isearch.el (isearch-delete-char): Reopen hidden overlays (bug#52248). (isearch-filter-visible): Move text-property-not-all higher to not call isearch-range-invisible on inhibit-isearch text. Remove min/max since arguments are always in the right order. --- lisp/isearch.el | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/lisp/isearch.el b/lisp/isearch.el index fcb7d646c66..8815cb4f2d6 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el @@ -2504,6 +2504,11 @@ If no input items have been entered yet, just beep." (if (null (cdr isearch-cmds)) (ding) (isearch-pop-state)) + ;; When going back to the hidden match, reopen it. + (when (and (eq search-invisible 'open) isearch-hide-immediately + isearch-other-end) + (isearch-range-invisible (min (point) isearch-other-end) + (max (point) isearch-other-end))) (isearch-update)) (defun isearch-del-char (&optional arg) @@ -3787,10 +3792,9 @@ Isearch, at least partially, as determined by `isearch-range-invisible'. If `search-invisible' is t, which allows Isearch matches inside invisible text, this function will always return non-nil, regardless of what `isearch-range-invisible' says." - (and (or (eq search-invisible t) - (not (isearch-range-invisible beg end))) - (not (text-property-not-all (min beg end) (max beg end) - 'inhibit-isearch nil)))) + (and (not (text-property-not-all beg end 'inhibit-isearch nil)) + (or (eq search-invisible t) + (not (isearch-range-invisible beg end))))) ;; General utilities -- 2.39.2