From 5fadb7f200fb0ffc9e596f8045c7068b78084684 Mon Sep 17 00:00:00 2001 From: maxfl Date: Wed, 27 Jun 2012 19:54:30 +0800 Subject: [PATCH] fix logic --- fish_pager.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fish_pager.cpp b/fish_pager.cpp index afcda6740..62b1a352b 100644 --- a/fish_pager.cpp +++ b/fish_pager.cpp @@ -391,7 +391,7 @@ static int print_max( const wchar_t *str, int max, int has_more ) /** Print the specified item using at the specified amount of space */ -static void completion_print_item( const wchar_t *prefix, comp_t *c, int width, bool primary ) +static void completion_print_item( const wchar_t *prefix, comp_t *c, int width, bool secondary ) { int comp_width=0, desc_width=0; int written=0; @@ -424,7 +424,7 @@ static void completion_print_item( const wchar_t *prefix, comp_t *c, int width, } - rgb_color_t bg = primary ? rgb_color_t::normal() : get_color(HIGHLIGHT_PAGER_SECONDARY); + rgb_color_t bg = secondary ? get_color(HIGHLIGHT_PAGER_SECONDARY) : rgb_color_t::normal(); for( size_t i=0; icomp.size(); i++ ) { const wcstring &comp = c->comp.at(i); @@ -457,7 +457,7 @@ static void completion_print_item( const wchar_t *prefix, comp_t *c, int width, writech( L' '); } } - if ( !primary ) + if ( secondary ) set_color( rgb_color_t::normal(), rgb_color_t::normal() ); }