summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--Src/init.c6
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)