File bsc896914.patch of Package zsh.7007

Index: zsh-5.0.5/Completion/compinit
===================================================================
--- zsh-5.0.5.orig/Completion/compinit
+++ zsh-5.0.5/Completion/compinit
@@ -167,9 +167,11 @@ typeset -g _comp_setup='local -A _comp_c
              local IFS=$'\'\ \\t\\r\\n\\0\''
              enable -p \| \~ \( \? \* \[ \< \^ \#
              exec </dev/null;
-             trap - ZERR
-             local -a reply
-             local REPLY'
+             trap - ZERR;
+             local -a reply;
+             local REPLY;
+             local REPORTTIME;
+             unset REPORTTIME'
 
 # These can hold names of functions that are to be called before/after all
 # matches have been generated.
Index: zsh-5.0.5/Src/jobs.c
===================================================================
--- zsh-5.0.5.orig/Src/jobs.c
+++ zsh-5.0.5/Src/jobs.c
@@ -884,6 +884,7 @@ should_report_time(Job j)
     struct value vbuf;
     Value v;
     char *s = "REPORTTIME";
+    int save_errflag = errflag;
     zlong reporttime;
 
     /* if the time keyword was used */
@@ -891,11 +892,13 @@ should_report_time(Job j)
 	return 1;
 
     queue_signals();
+    errflag = 0;
     if (!(v = getvalue(&vbuf, &s, 0)) ||
 	(reporttime = getintvalue(v)) < 0) {
 	unqueue_signals();
 	return 0;
     }
+    errflag = save_errflag;
     unqueue_signals();
     /* can this ever happen? */
     if (!j->procs)
openSUSE Build Service is sponsored by