mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-03 12:27:26 -05:00
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:
@ -169,10 +169,8 @@ 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)))))))
|
|
||||||
(if (and ovs (<= count (length ovs)))
|
|
||||||
(goto-char (overlay-start (nth (- (abs count) 1) 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
|
||||||
|
Reference in New Issue
Block a user