summary refs log tree commit diff
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2000-05-02 08:56:28 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2000-05-02 08:56:28 +0000
commitd67ca6872eecae17f2a342c28b6dcb6fe2f3d6fc (patch)
treef63f366692c288cccc1d5c3f6dc5065fd642e2d6
parent753cc6b22adb659e9c6bdcf854d99bfe4b731d26 (diff)
downloadzsh-d67ca6872eecae17f2a342c28b6dcb6fe2f3d6fc.tar.gz
zsh-d67ca6872eecae17f2a342c28b6dcb6fe2f3d6fc.tar.xz
zsh-d67ca6872eecae17f2a342c28b6dcb6fe2f3d6fc.zip
fix for _arguments, use on-line-argument-numbers only for normal arguments, not for arguments of options (11052)
-rw-r--r--ChangeLog4
-rw-r--r--Src/Zle/computil.c6
2 files changed, 7 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index fccd6844e..cb104713d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2000-05-02  Sven Wischnowsky  <wischnow@informatik.hu-berlin.de>
 
+	* 11052: Src/Zle/computil.c: fix for _arguments, use
+ 	on-line-argument-numbers only for normal arguments, not for
+ 	arguments of options
+	
 	* 11049: Completion/Base/_arguments, Completion/Base/_first,
  	Completion/Builtins/_hash, Completion/Core/_expand,
  	Completion/User/_gprof, Completion/User/_mount,
diff --git a/Src/Zle/computil.c b/Src/Zle/computil.c
index f749a6099..1846bc62f 100644
--- a/Src/Zle/computil.c
+++ b/Src/Zle/computil.c
@@ -1396,9 +1396,9 @@ ca_set_data(char *opt, Caarg arg, char **args, int single)
 
     addopt = (opt ? 0 : ca_laststate.oopt);
 
-    for (; arg && (arg->num < 0 ||
-		   (arg->min <= ca_laststate.nth + addopt &&
-		    arg->num >= ca_laststate.nth));) {
+    for (; arg && (opt || (arg->num < 0 ||
+			   (arg->min <= ca_laststate.nth + addopt &&
+			    arg->num >= ca_laststate.nth)));) {
 	lopt = (arg->type == CAA_OPT);
 	if (!opt && !lopt && oopt > 0)
 	    oopt = 0;