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:
parent
c16e16e92b
commit
6127692848
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue