branch: externals/dict-tree commit 1e5b3f6d5838f300ac2ac054c3a600e8a0fdca4e Author: Toby S. Cubitt <toby-predict...@dr-qubit.org> Commit: Toby S. Cubitt <toby-predict...@dr-qubit.org>
Fix bug in dictree--wrap-fuzzy-rankfun wrapping. --- dict-tree.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dict-tree.el b/dict-tree.el index c8359e6..f10ed16 100644 --- a/dict-tree.el +++ b/dict-tree.el @@ -315,12 +315,12 @@ If START or END is negative, it counts from the end." (defun dictree--wrap-fuzzy-rankfun (rankfun) ; INTERNAL USE ONLY (lambda (a b) (funcall rankfun - (cons (nth 0 (car a)) (dictree--cell-data (cdr a))) - (cons (nth 0 (car b)) (dictree--cell-data (cdr b)))))) + (cons (car a) (dictree--cell-data (cdr a))) + (cons (car b) (dictree--cell-data (cdr b)))))) (defun dictree--wrap-fuzzy-rankfun (rankfun) ; INTERNAL USE ONLY `(lambda (a b) - (,rankfun (cons (nth 0 (car a)) (dictree--cell-data (cdr a))) - (cons (nth 0 (car b)) (dictree--cell-data (cdr b))))))) + (,rankfun (cons (car a) (dictree--cell-data (cdr a))) + (cons (car b) (dictree--cell-data (cdr b))))))) ;; return wrapped sortfun to ignore fuzzy query distance data (trie--if-lexical-binding