From 642ba5f37207f8444c02fd1cb8a98216ffb3251d Mon Sep 17 00:00:00 2001 From: Unmyth Date: Sat, 20 Mar 2021 12:22:27 +0200 Subject: [PATCH] Fix for diagnostics sort function data format Predicate for diagnostics sort function was fixed so that parameters format corresponds to the data format in the sorted list. --- helm-lsp.el | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/helm-lsp.el b/helm-lsp.el index cd98b5b..d8f4983 100755 --- a/helm-lsp.el +++ b/helm-lsp.el @@ -281,10 +281,8 @@ With a prefix ARG invalidates the cache first." (propertize file 'face 'lsp-details-face) (propertize (format ":%s:%s" line character) 'face 'lsp-details-face)) full-path start)))) - (-sort (-lambda ((full-path-1 _ (&Diagnostic :range - (&Range :start (&Position :line l1 :character c1)))) - (full-path-2 _ (&Diagnostic :range - (&Range :start (&Position :line l2 :character c2))))) + (-sort (-lambda ((_ full-path-1 (&Position :line l1 :character c1)) + (_ full-path-2 (&Position :line l2 :character c2))) (if (string= full-path-1 full-path-2) (if (= l1 l2) (< c1 c2) (< l1 l2)) (string< full-path-1 full-path-2)))))))