about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Stephenson <pws@zsh.org>2013-10-24 17:49:37 +0100
committerPeter Stephenson <pws@zsh.org>2013-10-24 17:49:37 +0100
commit7a5b85292a73b384a88a17a2b327539c608a4349 (patch)
tree422cfa03b82fc68c4a3eebd4c736d46b54545dc1
parent59b060bd5bf2ca08f43f5a0e308a231494e0efd6 (diff)
downloadzsh-7a5b85292a73b384a88a17a2b327539c608a4349.tar.gz
zsh-7a5b85292a73b384a88a17a2b327539c608a4349.tar.xz
zsh-7a5b85292a73b384a88a17a2b327539c608a4349.zip
31882: Insulate completion widget against environment.
Prevents change in pipestatus leaking back out.
-rw-r--r--ChangeLog3
-rw-r--r--Src/Zle/compcore.c5
2 files changed, 4 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index e8e69ae1e..09201dd38 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2013-10-24  Peter Stephenson  <p.stephenson@samsung.com>
 
+	* 31882: Src/Zle/compcore.c: better insulation of
+	completion widget excecution against job environment.
+
 	* 31884: Test/A05execution.ztst: eliminate variable output
 	from test due to vagaries of uniq implementation.
 
diff --git a/Src/Zle/compcore.c b/Src/Zle/compcore.c
index 39d41bdb5..5c5628a8d 100644
--- a/Src/Zle/compcore.c
+++ b/Src/Zle/compcore.c
@@ -826,7 +826,6 @@ callcompfunc(char *s, char *fn)
 	sfcontext = SFC_CWIDGET;
 	NEWHEAPS(compheap) {
 	    LinkList largs = NULL;
-	    int olv = lastval;
 
 	    if (*cfargs) {
 		char **p = cfargs;
@@ -836,9 +835,7 @@ callcompfunc(char *s, char *fn)
 		while (*p)
 		    addlinknode(largs, dupstring(*p++));
 	    }
-	    doshfunc(shfunc, largs, 0);
-	    cfret = lastval;
-	    lastval = olv;
+	    cfret = doshfunc(shfunc, largs, 1);
 	} OLDHEAPS;
 	sfcontext = osc;
 	endparamscope();