diff options
| author | Spencer Baugh | 2024-08-02 12:15:58 -0400 |
|---|---|---|
| committer | Eli Zaretskii | 2024-08-15 10:41:35 +0300 |
| commit | 7b60a2532895ebda2db2798767cbaff049032edb (patch) | |
| tree | 3ce4b0aa0004e1b9fb508638ca3a367d41811c88 | |
| parent | 62067d2ae7563352cae4eedd4b784fc0ffcd78a3 (diff) | |
| download | emacs-7b60a2532895ebda2db2798767cbaff049032edb.tar.gz emacs-7b60a2532895ebda2db2798767cbaff049032edb.zip | |
Fix 'partial-completion' for candidates containing newlines
'partial-completion' tries to match a pattern containing wildcards
(such as `any' or `prefix') against completion candidates.
Wildcards are supposed to match any sequence of characters, but
'completion-pcm--pattern->regex' transformed the wildcards into
".*", which won't match sequences containing newlines. Fix this to
properly match anything by using "[^z-a]*" instead.
(That's (rx (* anything)).)
* lisp/minibuffer.el (completion-pcm--pattern->regex): Fix
regex. (Bug#72425)
| -rw-r--r-- | lisp/minibuffer.el | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index bef565378ea..3beb3c06a18 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el | |||
| @@ -3948,7 +3948,7 @@ or a symbol, see `completion-pcm--merge-completions'." | |||
| 3948 | (t | 3948 | (t |
| 3949 | (let ((re (if (eq x 'any-delim) | 3949 | (let ((re (if (eq x 'any-delim) |
| 3950 | (concat completion-pcm--delim-wild-regex "*?") | 3950 | (concat completion-pcm--delim-wild-regex "*?") |
| 3951 | ".*?"))) | 3951 | "[^z-a]*?"))) |
| 3952 | (if (if (consp group) (memq x group) group) | 3952 | (if (if (consp group) (memq x group) group) |
| 3953 | (concat "\\(" re "\\)") | 3953 | (concat "\\(" re "\\)") |
| 3954 | re))))) | 3954 | re))))) |