branch: master
commit 044307ddcb22132a1938860b70b825118c83d91b
Author: Oleh Krehel <[email protected]>
Commit: Oleh Krehel <[email protected]>
ivy.el (ivy--sort-files-by-date): Fix due to destructive cl-sort
---
ivy.el | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/ivy.el b/ivy.el
index 3dbfd82..7eb3898 100644
--- a/ivy.el
+++ b/ivy.el
@@ -1729,7 +1729,7 @@ The alist VAL is a sorting function with the signature of
(defun ivy--sort-files-by-date (_name candidates)
"Re-soft CANDIDATES according to file modification date."
(let ((default-directory ivy--directory))
- (cl-sort candidates
+ (cl-sort (copy-sequence candidates)
(lambda (f1 f2)
(time-less-p
(nth 5 (file-attributes f2))