From c7e6b62d9e2f56bad176d391238e5d0ec7c28ade Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jo=C3=A3o=20T=C3=A1vora?= Date: Mon, 23 Dec 2019 12:03:13 +0100 Subject: [PATCH] Fix a bug in completion--flex-adjust-metadata If minibuffer-default coincided with the first of completions, the empty list would be returned. * lisp/minibuffer.el (completion--flex-adjust-metadata): Make sure to never return empty list. --- lisp/minibuffer.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index 2dba26818e1..6011a493d0b 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el @@ -3612,7 +3612,8 @@ that is non-nil." for comp = (cadr l) when (string-prefix-p minibuffer-default comp) do (setf (cdr l) (cddr l)) - and return (cons comp pre-sorted))) + and return (cons comp pre-sorted) + finally return pre-sorted)) (t pre-sorted)))))) `(metadata -- 2.39.2