1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-28 17:10:59 +01:00

39026: pattern specified with _arguments' -A option shouldn't be checked against words after the cursor

This commit is contained in:
Oliver Kiddle 2016-08-13 01:32:31 +02:00
parent a1a58dde6a
commit f760bd6064
2 changed files with 9 additions and 2 deletions

View file

@ -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;