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.
This commit is contained in:
KendrickLamarck
2024-12-19 13:51:39 +01:00
committed by Henrik Lissner
parent 0ef4a3f9e1
commit fcf726726b

View File

@ -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)))