Formatting

This commit is contained in:
ridiculousfish 2013-06-02 01:14:26 -07:00
parent fd15d30987
commit 464187491f
8 changed files with 64 additions and 62 deletions

@ -1536,7 +1536,7 @@ static const completion_t *cycle_competions(const std::vector<completion_t> &com
const completion_t &c = comp.at(idx);
/* Try this completion */
if (! (c.flags & COMPLETE_REPLACES_TOKEN) || reader_can_replace(command_line, c.flags))
if (!(c.flags & COMPLETE_REPLACES_TOKEN) || reader_can_replace(command_line, c.flags))
{
/* Success */
result = &c;
@ -1605,7 +1605,7 @@ static bool handle_completions(const std::vector<completion_t> &comp)
the token doesn't contain evil operators
like {}
*/
if (! (c.flags & COMPLETE_REPLACES_TOKEN) || reader_can_replace(tok, c.flags))
if (!(c.flags & COMPLETE_REPLACES_TOKEN) || reader_can_replace(tok, c.flags))
{
completion_insert(c.completion.c_str(), c.flags);
}
@ -1635,7 +1635,7 @@ static bool handle_completions(const std::vector<completion_t> &comp)
for (size_t i=0; i< comp.size(); i++)
{
const completion_t &el = comp.at(i);
if (el.match.type == best_match_type && ! (el.flags & COMPLETE_REPLACES_TOKEN))
if (el.match.type == best_match_type && !(el.flags & COMPLETE_REPLACES_TOKEN))
{
will_replace_token = false;
break;
@ -1652,7 +1652,7 @@ static bool handle_completions(const std::vector<completion_t> &comp)
continue;
/* Only use completions that match replace_token */
bool completion_replace_token = !! (el.flags & COMPLETE_REPLACES_TOKEN);
bool completion_replace_token = !!(el.flags & COMPLETE_REPLACES_TOKEN);
if (completion_replace_token != will_replace_token)
continue;
@ -1682,7 +1682,8 @@ static bool handle_completions(const std::vector<completion_t> &comp)
{
/* Determine the shared prefix length. */
size_t idx, max = mini(common_prefix.size(), el.completion.size());
for (idx=0; idx < max; idx++) {
for (idx=0; idx < max; idx++)
{
wchar_t ac = common_prefix.at(idx), bc = el.completion.at(idx);
bool matches = (ac == bc);
/* If we are replacing the token, allow case to vary */

@ -249,7 +249,8 @@ 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)
{
@ -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