diff options
| author | Peter Stephenson <pws@users.sourceforge.net> | 2003-02-17 11:41:58 +0000 |
|---|---|---|
| committer | Peter Stephenson <pws@users.sourceforge.net> | 2003-02-17 11:41:58 +0000 |
| commit | 40c29457f285deaba4959dd23d5f2dd859ddb956 (patch) | |
| tree | eef78ccf4dd50dd9ef37a4a8764e01ebfd9733ce /Src/parse.c | |
| parent | 18249: new completion function for user mode linux (diff) | |
| download | zsh-40c29457f285deaba4959dd23d5f2dd859ddb956.tar zsh-40c29457f285deaba4959dd23d5f2dd859ddb956.tar.gz zsh-40c29457f285deaba4959dd23d5f2dd859ddb956.tar.bz2 zsh-40c29457f285deaba4959dd23d5f2dd859ddb956.tar.lz zsh-40c29457f285deaba4959dd23d5f2dd859ddb956.tar.xz zsh-40c29457f285deaba4959dd23d5f2dd859ddb956.tar.zst zsh-40c29457f285deaba4959dd23d5f2dd859ddb956.zip | |
18251: Fix select and make it respect EOF
Diffstat (limited to 'Src/parse.c')
| -rw-r--r-- | Src/parse.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Src/parse.c b/Src/parse.c index a6c4cd10b..d7aaa9f63 100644 --- a/Src/parse.c +++ b/Src/parse.c @@ -923,18 +923,19 @@ par_for(int *complex) yylex(); type = WC_FOR_COND; } else { - int np, n, posix_in, ona = noaliases, onc = nocorrect; + int np = 0, n, posix_in, ona = noaliases, onc = nocorrect; infor = 0; if (tok != STRING || !isident(tokstr)) YYERRORV(oecused); - np = ecadd(0); + if (!sel) + np = ecadd(0); n = 0; incmdpos = 1; noaliases = nocorrect = 1; for (;;) { n++; ecstr(tokstr); - yylex(); + yylex(); if (tok != STRING || !strcmp(tokstr, "in") || sel) break; if (!isident(tokstr) || errflag) @@ -946,7 +947,8 @@ par_for(int *complex) } noaliases = ona; nocorrect = onc; - ecbuf[np] = n; + if (!sel) + ecbuf[np] = n; posix_in = isnewlin; while (isnewlin) yylex(); |
