summary refs log tree commit diff
diff options
context:
space:
mode:
-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;