fix(fold): don't expect evil-vimish-fold

This module is also used by non-Evil users. Also,
`evil-vimish-fold/next-fold` and friends just wrap the corresponding
vimish-fold functions in `dotimes`, anyway.
This commit is contained in:
45mg 2024-05-20 18:02:30 +00:00 committed by Henrik Lissner
parent cc7a509e10
commit c471ab00a6

View file

@ -169,8 +169,9 @@ Targets `vimmish-fold', `hideshow', `ts-fold' and `outline' folds."
(lambda () (lambda ()
(when (featurep 'vimish-fold) (when (featurep 'vimish-fold)
(if (> count 0) (if (> count 0)
(evil-vimish-fold/next-fold count) (dotimes (_ count) (vimish-fold-next-fold))
(evil-vimish-fold/previous-fold (- count)))) (dotimes (_ count)
(vimish-fold-previous-fold (- count)))))
(if (/= (point) orig-pt) (point))) (if (/= (point) orig-pt) (point)))
(lambda () (lambda ()
;; ts-fold does not define movement functions so we need to do it ourselves ;; ts-fold does not define movement functions so we need to do it ourselves