summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMikael Magnusson <mikachu@gmail.com>2026-05-24 16:09:00 +0200
committerMikael Magnusson <mikachu@gmail.com>2026-05-25 07:10:42 +0200
commit054975eefc5e6f03548c972025ae23401dfc449b (patch)
tree0a5d8242c63a6c87e77dddb6d86e4e11e9f4733f
parent54609 + 54606: additional fixes for interactive menu selection (diff)
downloadzsh-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--ChangeLog3
-rw-r--r--Src/Zle/compresult.c4
2 files changed, 4 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 2c2dfc660..3cfe38e71 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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. */