diff options
| author | Daniel Mendler <mail@daniel-mendler.de> | 2022-11-10 18:38:59 +0100 |
|---|---|---|
| committer | Daniel Mendler <mail@daniel-mendler.de> | 2022-11-10 18:38:59 +0100 |
| commit | 6f187a8adb165da5657288b83e429dee1dbb0591 (patch) | |
| tree | 424857c643270c6307add8b7bbe4115e1e89739e /corfu.el | |
| parent | e6e8fa6684396e6efe1c29c4413657f0bb76ce03 (diff) | |
Rename sort predicate, corresponding to Vertico
Diffstat (limited to 'corfu.el')
| -rw-r--r-- | corfu.el | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -566,13 +566,13 @@ A scroll bar is displayed from LO to LO+BAR." (cons (apply #'completion-all-completions args) hl)) (cons (apply #'completion-all-completions args) hl)))) -(defun corfu--sort-predicate (x y) - "Sorting predicate which compares X and Y." +(defsubst corfu--length-string< (x y) + "Sorting predicate which compares X and Y first by length then by `string<'." (or (< (length x) (length y)) (and (= (length x) (length y)) (string< x y)))) (defun corfu-sort-length-alpha (list) "Sort LIST by length and alphabetically." - (sort list #'corfu--sort-predicate)) + (sort list #'corfu--length-string<)) (defmacro corfu--partition! (list form) "Evaluate FORM for every element and partition LIST." |
