]> git.eshelyaron.com Git - emacs.git/commit
Correctly include fixed strings before a prefix wildcard in PCM
authorSpencer Baugh <sbaugh@janestreet.com>
Mon, 26 Aug 2024 14:12:51 +0000 (10:12 -0400)
committerEshel Yaron <me@eshelyaron.com>
Sat, 14 Sep 2024 20:34:22 +0000 (22:34 +0200)
commit6a4f382c4eed2d0605e367c09b46e02ea3964aab
treeb2d87da9c70ee77ef41d2060557789aae70f7475
parent39605ea1b57c3d755aa769fd90d288982fed820a
Correctly include fixed strings before a prefix wildcard in PCM

In 03ac16ece40ba3e3ba805d6a61cc457d84bf3792 I fixed a bug with the
PCM implementation of substring completion, relating to the handling
of PCM wildcards.
However, this fix was incomplete.  This change completes the fix by
also including a fixed string if it appears before a 'prefix'
wildcard, even if 'try-completion' doesn't discover that fixed
string grows to a unique completion.
I discovered this bug while working on enhancements to PCM
completion related to 'completion-pcm-leading-wildcard'.
* lisp/minibuffer.el (completion-pcm--merge-completions): Include
fixed strings before 'prefix wildcard.  (Bug#72819)
* test/lisp/minibuffer-tests.el (completion-substring-test-5): Add a
test for this behavior.

(cherry picked from commit 3cda1fdc3b755dd329617cabc266e2b86894d0cb)
lisp/minibuffer.el
test/lisp/minibuffer-tests.el