Skip to content

Commit

Permalink
consult--invisible-open-*: Use canonical
Browse files Browse the repository at this point in the history
  • Loading branch information
minad committed Dec 25, 2022
1 parent 84bacb5 commit 7c514c0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions consult.el
Original file line number Diff line number Diff line change
Expand Up @@ -1346,7 +1346,7 @@ ORIG is the original function, HOOKS the arguments."
See `isearch-open-necessary-overlays' and `isearch-open-overlay-temporary'."
(if (and (derived-mode-p #'org-mode) (fboundp 'org-fold-show-set-visibility))
;; New Org 9.6 fold-core API
(org-fold-show-set-visibility 'lineage)
(org-fold-show-set-visibility 'canonical)
(dolist (ov (let ((inhibit-field-text-motion t))
(overlays-in (line-beginning-position) (line-end-position))))
(when-let (fun (overlay-get ov 'isearch-open-invisible))
Expand All @@ -1364,7 +1364,7 @@ See `isearch-open-necessary-overlays' and `isearch-open-overlay-temporary'."
;; modifications such that we can restore the ones which got modified.
(let ((regions (delq nil (org-fold-core-get-regions
:with-markers t :from (point-min) :to (point-max)))))
(org-fold-show-set-visibility 'lineage)
(org-fold-show-set-visibility 'canonical)
(list (lambda ()
(pcase-dolist (`(,beg ,end ,spec) regions)
(org-fold-core-region beg end t spec)
Expand Down

0 comments on commit 7c514c0

Please sign in to comment.