From 22faf1fa4b1290f5f7f7389bbef33acc2fcdce05 Mon Sep 17 00:00:00 2001 From: Bart Schaefer Date: Sun, 8 Jul 2001 00:32:12 +0000 Subject: Suppress XTRACE during user-defined widgets. --- Src/Zle/zle_main.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Src/Zle/zle_main.c b/Src/Zle/zle_main.c index 1d3f346ab..d46d3b537 100644 --- a/Src/Zle/zle_main.c +++ b/Src/Zle/zle_main.c @@ -672,7 +672,8 @@ execzlefunc(Thingy func, char **args) } r = 1; } else { - Eprog prog = getshfunc(w->u.fnnam); + Shfunc shf = (Shfunc) shfunctab->getnode(shfunctab, w->u.fnnam); + Eprog prog = (shf ? shf->funcdef : &dummy_eprog); if(prog == &dummy_eprog) { /* the shell function doesn't exist */ @@ -685,6 +686,7 @@ execzlefunc(Thingy func, char **args) ret = 1; } else { int osc = sfcontext, osi = movefd(0), olv = lastval; + int oxt = isset(XTRACE); LinkList largs = NULL; if (*args) { @@ -696,7 +698,9 @@ execzlefunc(Thingy func, char **args) startparamscope(); makezleparams(0); sfcontext = SFC_WIDGET; - doshfunc(w->u.fnnam, prog, largs, 0, 0); + opts[XTRACE] = 0; + doshfunc(w->u.fnnam, prog, largs, shf->flags, 0); + opts[XTRACE] = oxt; ret = lastval; lastval = olv; sfcontext = osc; -- cgit 1.4.1