about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--Src/Zle/computil.c9
2 files changed, 9 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index bc33f1924..5db3ca048 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2000-10-05  Sven Wischnowsky  <wischnow@zsh.org>
 
+	* 12897: Src/Zle/computil.c: comparguments: don't use
+ 	rest-argument-specification if it was inactivated
+	
 	* 12896: Doc/Zsh/arith.yo, Doc/Zsh/builtins.yo, Doc/Zsh/compctl.yo,
  	Doc/Zsh/compsys.yo, Doc/Zsh/compwid.yo, Doc/Zsh/expn.yo,
  	Doc/Zsh/func.yo, Doc/Zsh/mod_complist.yo: cleanup
diff --git a/Src/Zle/computil.c b/Src/Zle/computil.c
index b42e2a4c5..4b81cbc82 100644
--- a/Src/Zle/computil.c
+++ b/Src/Zle/computil.c
@@ -1685,7 +1685,8 @@ ca_set_data(LinkList descr, LinkList act, LinkList subc,
 
 	if (!opt) {
 	    if (arg->num >= 0 && !arg->next && miss)
-		arg = ca_laststate.d->rest;
+		arg = (ca_laststate.d->rest && ca_laststate.d->rest->active ?
+		       ca_laststate.d->rest : NULL);
 	    else {
 		onum = arg->num;
 		rest = (onum != arg->min && onum == ca_laststate.nth);
@@ -1693,7 +1694,8 @@ ca_set_data(LinkList descr, LinkList act, LinkList subc,
 		    if (arg->num != onum + 1)
 			miss = 1;
 		} else if (rest || (oopt > 0 && !opt)) {
-		    arg = ca_laststate.d->rest;
+		    arg = (ca_laststate.d->rest && ca_laststate.d->rest->active ?
+			   ca_laststate.d->rest : NULL);
 		    oopt = -1;
 		}
 	    }
@@ -1711,7 +1713,8 @@ ca_set_data(LinkList descr, LinkList act, LinkList subc,
     }
     if (!opt && oopt > 0) {
 	oopt = -1;
-	arg = ca_laststate.d->rest;
+	arg = (ca_laststate.d->rest && ca_laststate.d->rest->active ?
+	       ca_laststate.d->rest : NULL);
 
 	goto rec;
     }