diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2007-09-26 10:28:34 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2007-09-26 10:28:34 +0000 |
commit | af359d24a42d70ef037d1e298cba99f053317a03 (patch) | |
tree | fba9ccc741263ce30be8b16cf05b199c5907fcfd | |
parent | ef66a233de52414286532b09dfac244cc35ef198 (diff) | |
download | zsh-af359d24a42d70ef037d1e298cba99f053317a03.tar.gz zsh-af359d24a42d70ef037d1e298cba99f053317a03.tar.xz zsh-af359d24a42d70ef037d1e298cba99f053317a03.zip |
users/11883: return at top level caused following precommand functions
to return immediately
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | Src/init.c | 6 |
2 files changed, 9 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog index 626ab87ec..980827f62 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-09-26 Peter Stephenson <pws@csr.com> + + * users/11883: Src/init.c: "return" at top level caused + following precommand functions to return immediately. + 2007-09-26 Clint Adams <clint@zsh.org> * 23834: Completion/Unix/Type/_tex: complete tex files for xetex diff --git a/Src/init.c b/Src/init.c index 980d3b1c9..55f32079b 100644 --- a/Src/init.c +++ b/Src/init.c @@ -1343,9 +1343,11 @@ zsh_main(UNUSED(int argc), char **argv) */ maybeshrinkjobtab(); - do + do { + /* Reset return from top level which gets us back here */ + retflag = 0; loop(1,0); - while (tok != ENDINPUT && (tok != LEXERR || isset(SHINSTDIN))); + } while (tok != ENDINPUT && (tok != LEXERR || isset(SHINSTDIN))); if (tok == LEXERR) { /* Make sure a parse error exits with non-zero status */ if (!lastval) |