fix(tree-sitter): message raised when jumping up
as opposed to a nasty error, the error was raised because I was not using the abs of count this commit also comes with general code cleanup, this includes - removal of the eval quasiquote antipattern when an apply would work better - use of the :key keyword instead of the lambda
This commit is contained in:
parent
6127692848
commit
32bf2ee4cf
1 changed files with 3 additions and 5 deletions
|
@ -169,11 +169,9 @@ Targets `vimmish-fold', `hideshow', `ts-fold' and `outline' folds."
|
||||||
(eq (overlay-get ov 'creator) 'ts-fold))
|
(eq (overlay-get ov 'creator) 'ts-fold))
|
||||||
;; `overlays-in' does not provide a list that is sorted
|
;; `overlays-in' does not provide a list that is sorted
|
||||||
;; (in the way we need it atleast) so we need to sort it based on direction
|
;; (in the way we need it atleast) so we need to sort it based on direction
|
||||||
(cl-sort (eval `(overlays-in ,@arg-list))
|
(cl-sort (apply #'overlays-in arg-list) comp-fun :key #'overlay-start))))
|
||||||
(lambda (ov1 ov2)
|
(if (and ovs (<= (abs count) (length ovs)))
|
||||||
(funcall comp-fun (overlay-start ov1) (overlay-start ov2)))))))
|
(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))
|
if (save-excursion (funcall fn))
|
||||||
collect it into points
|
collect it into points
|
||||||
finally do
|
finally do
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue