diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | Src/Zle/computil.c | 6 |
2 files changed, 9 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog index ffe21020b..3a375a4b3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2016-08-13 Oliver Kiddle <opk@zsh.org> + + * 39026: Src/Zle/computil.c: pattern specified with _arguments' + -A option shouldn't be checked against words after the cursor + 2016-08-12 Barton E. Schaefer <schaefer@zsh.org> * 39035: Src/subst.c, Test/D04parameter.ztst: ${(A)name=word} diff --git a/Src/Zle/computil.c b/Src/Zle/computil.c index 0028ac1ca..ecfa2bc34 100644 --- a/Src/Zle/computil.c +++ b/Src/Zle/computil.c @@ -2167,9 +2167,11 @@ ca_parse_line(Cadef d, int multi, int first) #endif ) return 1; - else if (state.arg && (!napat || !pattry(napat, line))) { + else if (state.arg && + (!napat || cur <= compcurrent || !pattry(napat, line))) { /* Otherwise it's a normal argument. */ - if (napat && ca_inactive(d, NULL, cur + 1, 1, NULL)) + if (napat && cur <= compcurrent && + ca_inactive(d, NULL, cur + 1, 1, NULL)) return 1; arglast = 1; |