* bug#52248: Open hidden overlays in isearch-delete-char
@ 2021-12-02 19:56 Juri Linkov
2021-12-03 17:13 ` Lars Ingebrigtsen
0 siblings, 1 reply; 3+ messages in thread
From: Juri Linkov @ 2021-12-02 19:56 UTC (permalink / raw)
To: 52248
Tags: patch
This is not a regression.
While navigating forward with C-s in a buffer with invisible overlays
such as when using outline-minor-mode with hidden outlines,
it opens hidden overlays on the current match, and hides again
when going to the next match.
But going back with DEL (isearch-delete-char) doesn't reopen
the hidden overlay on the previous match. Here is the fix:
diff --git a/lisp/isearch.el b/lisp/isearch.el
index fcb7d646c6..8421c5629b 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -2504,6 +2552,10 @@ isearch-delete-char
(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)
--
^ permalink raw reply related [flat|nested] 3+ messages in thread
* bug#52248: Open hidden overlays in isearch-delete-char
2021-12-02 19:56 bug#52248: Open hidden overlays in isearch-delete-char Juri Linkov
@ 2021-12-03 17:13 ` Lars Ingebrigtsen
2021-12-04 20:05 ` Juri Linkov
0 siblings, 1 reply; 3+ messages in thread
From: Lars Ingebrigtsen @ 2021-12-03 17:13 UTC (permalink / raw)
To: Juri Linkov; +Cc: 52248
Juri Linkov <juri@linkov.net> writes:
> But going back with DEL (isearch-delete-char) doesn't reopen
> the hidden overlay on the previous match. Here is the fix:
I haven't tested the patch, but it makes sense to me.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#52248: Open hidden overlays in isearch-delete-char
2021-12-03 17:13 ` Lars Ingebrigtsen
@ 2021-12-04 20:05 ` Juri Linkov
0 siblings, 0 replies; 3+ messages in thread
From: Juri Linkov @ 2021-12-04 20:05 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: 52248
close 52248 29.0.50
quit
>> But going back with DEL (isearch-delete-char) doesn't reopen
>> the hidden overlay on the previous match. Here is the fix:
>
> I haven't tested the patch, but it makes sense to me.
So pushed to master.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-12-04 20:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-02 19:56 bug#52248: Open hidden overlays in isearch-delete-char Juri Linkov
2021-12-03 17:13 ` Lars Ingebrigtsen
2021-12-04 20:05 ` Juri Linkov
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.