mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-03 10:21:46 +02:00
users/11883: return at top level caused following precommand functions
to return immediately
This commit is contained in:
parent
ef66a233de
commit
af359d24a4
2 changed files with 9 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue