mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-03 12:27:26 -05:00
fix(fold): handle bounding error
This basically stops the "not overlay" error we were getting when you tried to jump to many times. this does have the disadvantage of not jumping at all if the amount of jumps is higher than the amount of overlays but this can be fixed in a future commit if necessary.
This commit is contained in:
@ -172,7 +172,8 @@ Targets `vimmish-fold', `hideshow', `ts-fold' and `outline' folds."
|
||||
(cl-sort (eval `(overlays-in ,@arg-list))
|
||||
(lambda (ov1 ov2)
|
||||
(funcall comp-fun (overlay-start ov1) (overlay-start ov2)))))))
|
||||
(if ovs (goto-char (overlay-start (nth (- (abs count) 1) ovs))))))))
|
||||
(if (and ovs (<= count (length ovs)))
|
||||
(goto-char (overlay-start (nth (- (abs count) 1) ovs))))))))
|
||||
if (save-excursion (funcall fn))
|
||||
collect it into points
|
||||
finally do
|
||||
|
Reference in New Issue
Block a user