about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2000-05-12 07:03:41 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2000-05-12 07:03:41 +0000
commit6472a2b7bc524fbe3f543a41e8991e82e2580443 (patch)
tree062f102877faced270ed214698203f22dd5338f5
parent1452bfe1017cf83889919d561d3046c1b9ba1fb5 (diff)
downloadzsh-6472a2b7bc524fbe3f543a41e8991e82e2580443.tar.gz
zsh-6472a2b7bc524fbe3f543a41e8991e82e2580443.tar.xz
zsh-6472a2b7bc524fbe3f543a41e8991e82e2580443.zip
fix for compadd -x when there are no matches (11335)
-rw-r--r--ChangeLog5
-rw-r--r--Src/Zle/compcore.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index ccc946bac..8e60c96bd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2000-05-12  Sven Wischnowsky  <wischnow@zsh.org>
+
+	* 11335: Src/Zle/compcore.c: fix for compadd -x when there are no
+ 	matches
+	
 2000-05-11  Bart Schaefer  <schaefer@zsh.org>
 
 	* 11332: Completion/Commands/_complete_debug: Test descriptors
diff --git a/Src/Zle/compcore.c b/Src/Zle/compcore.c
index ee218e132..e8ea28400 100644
--- a/Src/Zle/compcore.c
+++ b/Src/Zle/compcore.c
@@ -400,7 +400,7 @@ do_completion(Hookdef dummy, Compldat dat)
 	if (nmatches > 1 && diffmatches) {
 	    /* There is more than one match. */
 	    ret = do_ambiguous();
-	} else if (nmatches == 1 || !diffmatches) {
+	} else if (nmatches == 1 || (nmatches > 1 && !diffmatches)) {
 	    /* Only one match. */
 	    Cmgroup m = amatches;