branch: externals/orderless
commit 0efa87672de2bd11b27fa4dc286163c42a9ce402
Author: Omar Antolín <[email protected]>
Commit: Omar Antolín <[email protected]>
Fix bug on no matches
---
orderless.el | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/orderless.el b/orderless.el
index a23a9970d5..22ac79927e 100644
--- a/orderless.el
+++ b/orderless.el
@@ -53,12 +53,13 @@
(when minibuffer-completing-file-name
(setq all (completion-pcm--filename-try-filter all)))
(condition-case nil
- (nconc
- (cl-loop for candidate in all
- when (cl-loop for regexp in regexps
- always (string-match-p regexp candidate))
- collect candidate)
- (length prefix))
+ (progn
+ (setq all
+ (cl-loop for candidate in all
+ when (cl-loop for regexp in regexps
+ always (string-match-p regexp
candidate))
+ collect candidate))
+ (when all (nconc all (length prefix))))
(invalid-regexp nil))))
(defun orderless-try-completion (string table pred point &optional _metadata)