From 0d3169ef70032559e201a500aff2197a2854aa72 Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Mon, 31 Mar 2014 10:01:39 -0700 Subject: Run restyle.sh to enforce style rules. --- highlight.cpp | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'highlight.cpp') diff --git a/highlight.cpp b/highlight.cpp index 73b5f193..14672bf0 100644 --- a/highlight.cpp +++ b/highlight.cpp @@ -61,7 +61,7 @@ static const wchar_t * const highlight_var[] = L"fish_color_redirection", L"fish_color_autosuggestion", L"fish_color_selection", - + L"fish_pager_color_prefix", L"fish_pager_color_completion", L"fish_pager_color_description", @@ -360,10 +360,10 @@ bool plain_statement_get_expanded_command(const wcstring &src, const parse_node_ rgb_color_t highlight_get_color(highlight_spec_t highlight, bool is_background) { rgb_color_t result = rgb_color_t::normal(); - + /* If sloppy_background is set, then we look at the foreground color even if is_background is set */ - bool treat_as_background = is_background && ! (highlight & highlight_modifier_sloppy_background); - + bool treat_as_background = is_background && !(highlight & highlight_modifier_sloppy_background); + /* Get the primary variable */ size_t idx = highlight_get_primary(highlight); if (idx >= VAR_COUNT) @@ -398,12 +398,12 @@ rgb_color_t highlight_get_color(highlight_spec_t highlight, bool is_background) result.set_underline(true); } } - + if (highlight & highlight_modifier_force_underline) { result.set_underline(true); } - + return result; } @@ -589,7 +589,7 @@ static size_t color_variable(const wchar_t *in, size_t in_len, std::vector 0); assert(in[0] == L'$'); - + // Handle an initial run of $s. size_t idx = 0; while (in[idx] == '$') @@ -606,13 +606,13 @@ static size_t color_variable(const wchar_t *in, size_t in_len, std::vectorcolor_children(node, parse_token_type_string, highlight_spec_command); } break; - + case symbol_switch_statement: { const parse_node_t *literal_switch = this->parse_tree.get_child(node, 0, parse_token_type_string); @@ -1348,7 +1348,7 @@ const highlighter_t::color_array_t & highlighter_t::highlight() this->color_node(*switch_arg, highlight_spec_param); } break; - + case symbol_for_header: { // Color the 'for' and 'in' as commands @@ -1356,7 +1356,7 @@ const highlighter_t::color_array_t & highlighter_t::highlight() const parse_node_t *literal_in_node = this->parse_tree.get_child(node, 2, parse_token_type_string); this->color_node(*literal_for_node, highlight_spec_command); this->color_node(*literal_in_node, highlight_spec_command); - + // Color the variable name as a parameter const parse_node_t *var_name_node = this->parse_tree.get_child(node, 1, parse_token_type_string); this->color_argument(*var_name_node); @@ -1415,7 +1415,7 @@ const highlighter_t::color_array_t & highlighter_t::highlight() } } break; - + case symbol_end_command: this->color_node(node, highlight_spec_command); break; -- cgit v1.2.3