[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/vertico ce95283 2/3: Use seq
From: |
Protesilaos Stavrou |
Subject: |
[elpa] externals/vertico ce95283 2/3: Use seq |
Date: |
Mon, 17 May 2021 06:42:51 -0400 (EDT) |
branch: externals/vertico
commit ce95283c4eadaa25177640a9b24eeb90cfbf0393
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
Use seq
---
vertico.el | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/vertico.el b/vertico.el
index d233ab9..854e831 100644
--- a/vertico.el
+++ b/vertico.el
@@ -34,6 +34,7 @@
;;; Code:
+(require 'seq)
(require 'cl-lib)
(eval-when-compile (require 'subr-x))
@@ -300,7 +301,7 @@
vertico--keep
(>= vertico--index 0)
(nth vertico--index vertico--candidates))))
- (setq vertico--index (and old (cl-position old candidates :test
#'equal)))))
+ (setq vertico--index (and old (seq-position candidates old)))))
(setq vertico--input (cons content pt)
vertico--base base
vertico--total total
@@ -340,8 +341,8 @@
(index (min (max 0 (- vertico--index (/ vertico-count 2) (if
group-format -1 0)))
(max 0 (- vertico--total vertico-count))))
(candidates
- (thread-last (cl-subseq vertico--candidates index
- (min (+ index vertico-count) vertico--total))
+ (thread-last (seq-subseq vertico--candidates index
+ (min (+ index vertico-count)
vertico--total))
(funcall vertico--highlight)
(vertico--annotate metadata)))
(max-width (- (window-width) 4))