diff options
| author | Mikael Magnusson <mikachu@gmail.com> | 2026-05-24 16:09:00 +0200 |
|---|---|---|
| committer | Mikael Magnusson <mikachu@gmail.com> | 2026-05-25 07:10:42 +0200 |
| commit | 054975eefc5e6f03548c972025ae23401dfc449b (patch) | |
| tree | 0a5d8242c63a6c87e77dddb6d86e4e11e9f4733f | |
| parent | 54609 + 54606: additional fixes for interactive menu selection (diff) | |
| download | zsh-054975eefc5e6f03548c972025ae23401dfc449b.tar zsh-054975eefc5e6f03548c972025ae23401dfc449b.tar.gz zsh-054975eefc5e6f03548c972025ae23401dfc449b.tar.bz2 zsh-054975eefc5e6f03548c972025ae23401dfc449b.tar.lz zsh-054975eefc5e6f03548c972025ae23401dfc449b.tar.xz zsh-054975eefc5e6f03548c972025ae23401dfc449b.tar.zst zsh-054975eefc5e6f03548c972025ae23401dfc449b.zip | |
54609: fix accept-and-hold completion for words with leading quotes
The intention here was probably to skip leading braces, but the code
is a no-op because m->qipl is 0 in that case. When there is a quote, we
don't want to skip it, so just remove that thing.
There can never be a combination of both cases, "{<tab> will quote the
brace and not actually do brace completion, and for {"<tab> other code
will remove the " because we only handle leading quotes (I think?).
| -rw-r--r-- | ChangeLog | 3 | ||||
| -rw-r--r-- | Src/Zle/compresult.c | 4 |
2 files changed, 4 insertions, 3 deletions
@@ -1,5 +1,8 @@ 2026-05-25 Mikael Magnusson <mikachu@gmail.com> + * 54609: Src/Zle/compresult.c: fix accept-and-hold completion + for words with leading quotes + * 54609 + 54606: Src/Zle/complist.c: additional fixes for interactive menu selection diff --git a/Src/Zle/compresult.c b/Src/Zle/compresult.c index 45f01fef5..5db573d1f 100644 --- a/Src/Zle/compresult.c +++ b/Src/Zle/compresult.c @@ -588,9 +588,7 @@ instmatch(Cmatch m, int *scs) /* Ignored prefix. */ if (m->ipre) { - char *p = m->ipre + (menuacc ? m->qipl : 0); - - inststrlen(p, 1, (l = strlen(p))); + inststrlen(m->ipre, 1, (l = strlen(m->ipre))); r += l; } /* -P prefix. */ |
