1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-21 18:23:59 +00:00

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.
This commit is contained in:
João Távora 2019-12-23 12:03:13 +01:00
parent 1e758530b0
commit c7e6b62d9e

View File

@ -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