diff options
author | Tanaka Akira <akr@users.sourceforge.net> | 2000-02-24 14:44:28 +0000 |
---|---|---|
committer | Tanaka Akira <akr@users.sourceforge.net> | 2000-02-24 14:44:28 +0000 |
commit | 6785dcb5c920b6be812b4d1a70ce53ed47ff2f30 (patch) | |
tree | 332ee00c91dbd07c7982465fb61dd6dbebe95cc5 /Src/Zle/compcore.c | |
parent | 01ffe47e012deb204dc74a3fff794f8b4a3ec795 (diff) | |
download | zsh-6785dcb5c920b6be812b4d1a70ce53ed47ff2f30.tar.gz zsh-6785dcb5c920b6be812b4d1a70ce53ed47ff2f30.tar.xz zsh-6785dcb5c920b6be812b4d1a70ce53ed47ff2f30.zip |
zsh-workers/9865
Diffstat (limited to 'Src/Zle/compcore.c')
-rw-r--r-- | Src/Zle/compcore.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/Src/Zle/compcore.c b/Src/Zle/compcore.c index 3e4d4c93c..b0ee2b1d0 100644 --- a/Src/Zle/compcore.c +++ b/Src/Zle/compcore.c @@ -163,10 +163,10 @@ mod_export struct cldata listdat; /**/ mod_export int ispattern, haspattern; -/* Non-zero if at least one match was added without -U. */ +/* Non-zero if at least one match was added without/with -U. */ /**/ -mod_export int hasmatched; +mod_export int hasmatched, hasunmatched; /* The current group of matches. */ @@ -304,7 +304,7 @@ do_completion(Hookdef dummy, Compldat dat) startauto = isset(AUTOMENU); movetoend = ((cs == we || isset(ALWAYSTOEND)) ? 2 : 1); showinglist = 0; - hasmatched = 0; + hasmatched = hasunmatched = 0; minmlen = 1000000; maxmlen = -1; @@ -1522,9 +1522,12 @@ addmatches(Cadata dat, char **argv) /* Switch back to the heap that was used when the completion widget * was invoked. */ SWITCHHEAPS(compheap) { - if ((doadd = (!dat->apar && !dat->opar && !dat->dpar)) && - (dat->aflags & CAF_MATCH)) - hasmatched = 1; + if ((doadd = (!dat->apar && !dat->opar && !dat->dpar))) { + if (dat->aflags & CAF_MATCH) + hasmatched = 1; + else + hasunmatched = 1; + } if (dat->apar) aparl = newlinklist(); if (dat->opar) |