about summary refs log tree commit diff
path: root/Src/Zle
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 /Src/Zle
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)
Diffstat (limited to 'Src/Zle')
-rw-r--r--Src/Zle/computil.c9
1 files changed, 6 insertions, 3 deletions
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;
     }