diff options
author | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2002-02-18 14:30:46 +0000 |
---|---|---|
committer | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2002-02-18 14:30:46 +0000 |
commit | fa509f5219e18b664a7e559169d849b2ec9fb6f1 (patch) | |
tree | 644d61fcf6ba57d848a010883f3e8cdb3c6d6dae /Src/Zle | |
parent | 901d8b4c97f2f0855005825764c01d00d6d47f19 (diff) | |
download | zsh-fa509f5219e18b664a7e559169d849b2ec9fb6f1.tar.gz zsh-fa509f5219e18b664a7e559169d849b2ec9fb6f1.tar.xz zsh-fa509f5219e18b664a7e559169d849b2ec9fb6f1.zip |
fix group handling nothing should now possibly be added to the wrong group again (16668)
Diffstat (limited to 'Src/Zle')
-rw-r--r-- | Src/Zle/compcore.c | 46 |
1 files changed, 19 insertions, 27 deletions
diff --git a/Src/Zle/compcore.c b/Src/Zle/compcore.c index 748a01f6c..21ea681bb 100644 --- a/Src/Zle/compcore.c +++ b/Src/Zle/compcore.c @@ -1619,6 +1619,21 @@ addmatches(Cadata dat, char **argv) Heap oldheap; SWITCHHEAPS(oldheap, compheap) { + if (dat->dummies) + dat->aflags = ((dat->aflags | CAF_NOSORT | CAF_UNIQCON) & + ~CAF_UNIQALL); + + /* Select the group in which to store the matches. */ + gflags = (((dat->aflags & CAF_NOSORT ) ? CGF_NOSORT : 0) | + ((dat->aflags & CAF_UNIQALL) ? CGF_UNIQALL : 0) | + ((dat->aflags & CAF_UNIQCON) ? CGF_UNIQCON : 0)); + if (dat->group) { + endcmgroup(NULL); + begcmgroup(dat->group, gflags); + } else { + endcmgroup(NULL); + begcmgroup("default", 0); + } if (dat->mesg || dat->exp) { curexpl = (Cexpl) zhalloc(sizeof(struct cexpl)); curexpl->always = !!dat->mesg; @@ -1630,25 +1645,13 @@ addmatches(Cadata dat, char **argv) curexpl = NULL; } SWITCHBACKHEAPS(oldheap); - if (!*argv && !dat->dummies && !(dat->aflags & CAF_ALL)) { - SWITCHHEAPS(oldheap, compheap) { - /* Select the group in which to store the matches. */ - gflags = (((dat->aflags & CAF_NOSORT ) ? CGF_NOSORT : 0) | - ((dat->aflags & CAF_UNIQALL) ? CGF_UNIQALL : 0) | - ((dat->aflags & CAF_UNIQCON) ? CGF_UNIQCON : 0)); - if (dat->group) { - endcmgroup(NULL); - begcmgroup(dat->group, gflags); - } else { - endcmgroup(NULL); - begcmgroup("default", 0); - } - } SWITCHBACKHEAPS(oldheap); - + if (!*argv && !dat->dummies && !(dat->aflags & CAF_ALL)) return 1; - } + +#if 0 if (dat->dummies) dat->aflags = (dat->aflags | CAF_NOSORT | CAF_UNIQCON) & ~CAF_UNIQALL; +#endif for (bp = brbeg; bp; bp = bp->next) bp->curpos = ((dat->aflags & CAF_QUOTE) ? bp->pos : bp->qpos); for (bp = brend; bp; bp = bp->next) @@ -1881,17 +1884,6 @@ addmatches(Cadata dat, char **argv) } } } - /* Select the group in which to store the matches. */ - gflags = (((dat->aflags & CAF_NOSORT ) ? CGF_NOSORT : 0) | - ((dat->aflags & CAF_UNIQALL) ? CGF_UNIQALL : 0) | - ((dat->aflags & CAF_UNIQCON) ? CGF_UNIQCON : 0)); - if (dat->group) { - endcmgroup(NULL); - begcmgroup(dat->group, gflags); - } else { - endcmgroup(NULL); - begcmgroup("default", 0); - } if (*argv) { if (dat->pre) dat->pre = dupstring(dat->pre); |