diff options
author | ridiculousfish <corydoras@ridiculousfish.com> | 2013-06-02 01:14:26 -0700 |
---|---|---|
committer | ridiculousfish <corydoras@ridiculousfish.com> | 2013-06-02 01:14:26 -0700 |
commit | 464187491f910ab2cb8bb0a1bdc6013f10fcd319 (patch) | |
tree | 5b51990117d7778e6e536dd424ace26c376931a7 /wildcard.cpp | |
parent | fd15d30987af6104c060b91c60dbe34c8c3a42d7 (diff) |
Formatting
Diffstat (limited to 'wildcard.cpp')
-rw-r--r-- | wildcard.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/wildcard.cpp b/wildcard.cpp index fffe662a..0edcfa85 100644 --- a/wildcard.cpp +++ b/wildcard.cpp @@ -217,12 +217,12 @@ static bool wildcard_complete_internal(const wcstring &orig, debug(2, L"Got null string on line %d of file %s", __LINE__, __FILE__); return 0; } - + bool has_match = false; string_fuzzy_match_t fuzzy_match(fuzzy_match_exact); const bool at_end_of_wildcard = (*wc == L'\0'); const wchar_t *completion_string = NULL; - + // Hack hack hack // Implement EXPAND_FUZZY_MATCH by short-circuiting everything if there are no remaining wildcards if ((expand_flags & EXPAND_FUZZY_MATCH) && ! at_end_of_wildcard && ! wildcard_has(wc, true)) @@ -231,7 +231,7 @@ static bool wildcard_complete_internal(const wcstring &orig, if (fuzzy_match.type != fuzzy_match_none) { has_match = true; - + /* If we're not a prefix or exact match, then we need to replace the token. Note that in this case we're not going to call ourselves recursively, so these modified flags won't "leak" except into the completion. */ if (match_type_requires_full_replacement(fuzzy_match.type)) { @@ -247,9 +247,10 @@ static bool wildcard_complete_internal(const wcstring &orig, } } } - + /* Maybe we satisfied the wildcard normally */ - if (! has_match) { + if (! has_match) + { bool file_has_leading_dot = (is_first && str[0] == L'.'); if (at_end_of_wildcard && ! file_has_leading_dot) { @@ -264,7 +265,7 @@ static bool wildcard_complete_internal(const wcstring &orig, } } } - + if (has_match) { /* Wildcard complete */ @@ -281,7 +282,7 @@ static bool wildcard_complete_internal(const wcstring &orig, } else { - if (desc_func && ! (expand_flags & EXPAND_NO_DESCRIPTIONS)) + if (desc_func && !(expand_flags & EXPAND_NO_DESCRIPTIONS)) { /* A description generating function is specified, call @@ -299,7 +300,7 @@ static bool wildcard_complete_internal(const wcstring &orig, append_completion(out, out_completion, out_desc, flags, fuzzy_match); return true; } - + if (*wc == ANY_STRING) { bool res=false; |