about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-09-09 09:28:10 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-09-09 09:28:10 +0000
commitb6dd9af94235f6944970c8c16b329c78d2f6f6da (patch)
treedc612daff2e5476244abf9b63aa9c0c9c1ec9467 /Src
parent047267bdf3d1c7a145bad11f89aa3f085a8be9e5 (diff)
downloadzsh-b6dd9af94235f6944970c8c16b329c78d2f6f6da.tar.gz
zsh-b6dd9af94235f6944970c8c16b329c78d2f6f6da.tar.xz
zsh-b6dd9af94235f6944970c8c16b329c78d2f6f6da.zip
zsh-workers/7736
Diffstat (limited to 'Src')
-rw-r--r--Src/Zle/zle_tricky.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/Src/Zle/zle_tricky.c b/Src/Zle/zle_tricky.c
index b3a54bf59..f3d8677a8 100644
--- a/Src/Zle/zle_tricky.c
+++ b/Src/Zle/zle_tricky.c
@@ -3951,16 +3951,21 @@ addmatches(Cadata dat, char **argv)
 		} else
 		    dat->prpre = dupstring(dat->prpre);
 		/* Select the group in which to store the matches. */
-		if (dat->group || dat->ylist) {
+		if (dat->group) {
 		    endcmgroup(NULL);
-		    begcmgroup((dat->ylist ? NULL : dat->group),
-			       (dat->aflags & CAF_NOSORT));
+		    begcmgroup(dat->group, (dat->aflags & CAF_NOSORT));
 		    if (dat->aflags & CAF_NOSORT)
 			mgroup->flags |= CGF_NOSORT;
 		} else {
 		    endcmgroup(NULL);
 		    begcmgroup("default", 0);
 		}
+		if (dat->ylist) {
+		    endcmgroup(NULL);
+		    begcmgroup(NULL, (dat->aflags & CAF_NOSORT));
+		    if (dat->aflags & CAF_NOSORT)
+			mgroup->flags |= CGF_NOSORT;
+		}
 		/* Select the set of matches. */
 		oisalt = (dat->aflags & CAF_ALT);
 
@@ -5944,9 +5949,13 @@ makecomplistflags(Compctl cc, char *s, int incmd, int compadd)
     curcc = cc;
 
     mflags = 0;
-    if (cc->ylist || cc->gname) {
+    if (cc->gname) {
+	endcmgroup(NULL);
+	begcmgroup(cc->gname, cc->mask2 & CC_NOSORT);
+    }
+    if (cc->ylist) {
 	endcmgroup(NULL);
-	begcmgroup((cc->ylist ? NULL : cc->gname), cc->mask2 & CC_NOSORT);
+	begcmgroup(NULL, cc->mask2 & CC_NOSORT);
     }
     if (cc->mask & CC_REMOVE)
 	mflags |= CMF_REMOVE;