about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2000-10-05 08:55:35 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2000-10-05 08:55:35 +0000
commita93e62c630b6362f927023d322956edbdc96acbf (patch)
tree053beba09d8b7a57d37cae2e5fb01a0992cd5f02
parent62df18f0d8ce37c7d61aa58295c0e4b8b1a011a2 (diff)
downloadzsh-a93e62c630b6362f927023d322956edbdc96acbf.tar.gz
zsh-a93e62c630b6362f927023d322956edbdc96acbf.tar.xz
zsh-a93e62c630b6362f927023d322956edbdc96acbf.zip
comparguments: don't use rest-argument-specification if it was inactivated (12897)
-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;
     }