From fcf726726b0d94f4207d69770b175d39fae509f9 Mon Sep 17 00:00:00 2001 From: KendrickLamarck <56130490+KendrickLamarck@users.noreply.github.com> Date: Thu, 19 Dec 2024 13:51:39 +0100 Subject: [PATCH] fix(fold): fix recursive unfolding point-min and point-max were used in some places in +fold--open-rec-between instead of beg and end. This caused +fold/open-rec to open all folds rather than only the one the curser is on. --- modules/editor/fold/autoload/fold.el | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/modules/editor/fold/autoload/fold.el b/modules/editor/fold/autoload/fold.el index 3ce568a9f..57f2fdf88 100644 --- a/modules/editor/fold/autoload/fold.el +++ b/modules/editor/fold/autoload/fold.el @@ -113,9 +113,7 @@ Return non-nil if successful in doing so." (when (featurep 'vimish-fold) ;; from `vimish-fold-unfold-all' (mapc #'vimish-fold--unfold - (vimish-fold--folds-in - (point-min) - (point-max)))) + (vimish-fold--folds-in beg end))) (and (+fold--outline-fold-p) (outline-show-subtree)) (hs-life-goes-on @@ -126,7 +124,7 @@ Return non-nil if successful in doing so." (when (bound-and-true-p ts-fold-mode) ;; from `ts-fold-open-all' (ts-fold--ensure-ts - (thread-last (overlays-in (point-min) (point-max)) + (thread-last (overlays-in beg end) (seq-filter (lambda (ov) (eq (overlay-get ov 'invisible) 'ts-fold)))