diff options
author | Oliver Kiddle <opk@zsh.org> | 2016-08-13 01:32:31 +0200 |
---|---|---|
committer | Oliver Kiddle <opk@zsh.org> | 2016-08-13 01:32:31 +0200 |
commit | f760bd6064d429a851ec5a57a2c1b7896a1c0e51 (patch) | |
tree | 14d63c2b49564aaac7290e218ec97f0de77305a0 | |
parent | a1a58dde6adaa50625016f4c7048b456b2b99a1c (diff) | |
download | zsh-f760bd6064d429a851ec5a57a2c1b7896a1c0e51.tar.gz zsh-f760bd6064d429a851ec5a57a2c1b7896a1c0e51.tar.xz zsh-f760bd6064d429a851ec5a57a2c1b7896a1c0e51.zip |
39026: pattern specified with _arguments' -A option shouldn't be checked against words after the cursor
-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; |