summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--Src/Zle/complete.c14
2 files changed, 7 insertions, 12 deletions
diff --git a/ChangeLog b/ChangeLog
index 0e59e805a..fb8c8e3ba 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2017-01-30  Barton E. Schaefer  <schaefer@zsh.org>
+
+	* 40469: Src/Zle/complete.c: change strategy from 40453 to use
+	patcompile(PAT_HEAPDUP) instead of signal queueing.
+
 2017-01-30  Peter Stephenson  <p.stephenson@samsung.com>
 
 	* 40465: Test/C04funcdef.ztst, Test/V06parameter.ztst: use
diff --git a/Src/Zle/complete.c b/Src/Zle/complete.c
index 49b338f29..68bdf2332 100644
--- a/Src/Zle/complete.c
+++ b/Src/Zle/complete.c
@@ -896,14 +896,12 @@ do_comp_vars(int test, int na, char *sa, int nb, char *sb, int mod)
 	    int i, l = arrlen(compwords), t = 0, b = 0, e = l - 1;
 	    Patprog pp;
 
-	    queue_signals();	/* Protect PAT_STATIC */
-
 	    i = compcurrent - 1;
 	    if (i < 0 || i >= l)
 		return 0;
 
 	    singsub(&sa);
-	    pp = patcompile(sa, PAT_STATIC, NULL);
+	    pp = patcompile(sa, PAT_HEAPDUP, NULL);
 
 	    for (i--, p = compwords + i; i >= 0; p--, i--) {
 		if (pattry(pp, *p)) {
@@ -932,9 +930,6 @@ do_comp_vars(int test, int na, char *sa, int nb, char *sb, int mod)
 		t = 0;
 	    if (t && mod)
 		restrict_range(b, e);
-
-	    unqueue_signals();
-
 	    return t;
 	}
     case CVT_PRENUM:
@@ -957,12 +952,10 @@ do_comp_vars(int test, int na, char *sa, int nb, char *sb, int mod)
 	{
 	    Patprog pp;
 
-	    queue_signals();	/* Protect PAT_STATIC */
-
 	    if (!na)
 		return 0;
 
-	    if (!(pp = patcompile(sa, PAT_STATIC, 0)))
+	    if (!(pp = patcompile(sa, PAT_HEAPDUP, 0)))
 		return 0;
 
 	    if (test == CVT_PREPAT) {
@@ -1043,9 +1036,6 @@ do_comp_vars(int test, int na, char *sa, int nb, char *sb, int mod)
 		if (mod)
 		    ignore_suffix(ol - (p - compsuffix));
 	    }
-
-	    unqueue_signals();
-
 	    return 1;
 	}
     }