summaryrefslogtreecommitdiff
path: root/Src
diff options
context:
space:
mode:
authorJun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp>2021-11-01 23:33:57 +0900
committerJun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp>2021-11-01 23:33:57 +0900
commitb067ab08d65c7ec9a48f5527076bf0f9b17e622c (patch)
tree16ecaa9b3cc2b5a6cd1ac9c38ce4db46a1af9de2 /Src
parent6b2d120077e4a1c240d3d62e5b6e228eb88dd4a3 (diff)
downloadzsh-b067ab08d65c7ec9a48f5527076bf0f9b17e622c.tar.gz
zsh-b067ab08d65c7ec9a48f5527076bf0f9b17e622c.zip
49535: fix completion for ${<TAB> and ${(a)<TAB>
Diffstat (limited to 'Src')
-rw-r--r--Src/Zle/compcore.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/Src/Zle/compcore.c b/Src/Zle/compcore.c
index 2f3d53834..c6deff756 100644
--- a/Src/Zle/compcore.c
+++ b/Src/Zle/compcore.c
@@ -1187,9 +1187,9 @@ check_param(char *s, int set, int test)
return NULL;
/* Ignore the possible (...) flags. */
- tb = ++b, br++;
- if ((qstring ? skipparens('(', ')', &tb) :
- skipparens(Inpar, Outpar, &tb)) > 0 || tb - s >= offs) {
+ b++, br++;
+ if ((qstring ? skipparens('(', ')', &b) :
+ skipparens(Inpar, Outpar, &b)) > 0 || b - s > offs) {
/*
* We are still within the parameter flags. There's no
* point trying to do anything clever here with
@@ -1200,14 +1200,6 @@ check_param(char *s, int set, int test)
ispar = 2;
return NULL;
}
- if ((qstring ? '(' : Inpar) == *b) {
- /*
- * We are inside the braces but on the opening paren.
- * There is nothing useful to complete here?
- */
- return NULL;
- } else
- b = tb; /* Skip over the flags */
for (tb = p - 1; tb > s && *tb != Outbrace && *tb != Inbrace; tb--);
if (tb > s && *tb == Inbrace && (tb[-1] == String || *tb == Qstring))